On 2/6/02, Bruce Holm penned:
>You missed some key info I mentioned.  Access stores dates as date and ti
>me
>(1/6/2002 1:57:00 PM).
>In my table are classes for the same day, but at different times.
>What I want my query to find (and maybe what wasn't clear) is all classes
>for a given date (just the date part, not the time, otherwise it will ret
>urn
>just one class matching the date and time) where the id for one of the
>classes is "ClassSel" (the id of the class the user has specified from a
>pull down menu.)
>What I need is to determine the DATE portion of the field, ignoring the T
>IME
>portion of the same field.

This should work:

WHERE mydatefield >= #CreateODBCDate(mydate)#
and mydatefield < #CreateODBCDate(DateAdd('D', 1, mydate))#

This is assuming looking for a single date (mydate) and not a range 
and looks for a date/time value of midnight or later on mydate and 
earlier than midnight on the day after mydate. Or basically between 
12:00:00 AM and 11:59:59 PM on the date entered.

You can change the value of mydate in the dateadd function to a 2nd date.
-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to