View Full Version : Partial Date in Query Criteria


Terry_C
03-15-2002, 03:34 AM
I have a table with a date/time field formatted dd/mm/yyyy hh:mm:ss. I need to be able to select from this field via a form and query by using the dd/mm/yyyy data only. If I just put the dd/mm/yyyy criteria in my form "DateSelect" (the query criteria is Like (forms)!(DateSelect)!(text0)it obviously fails. How should I get it to query just on the dd/mm/yyyy part please (the easiest method preferably - if not the most elegant - new to this!) Thanks

KKilfoil
03-15-2002, 04:39 AM
The date portion of a date/time field is stored as an integer, with the time representing a decimal.

If you change your criteria to something like:

Int(YourDateField) = Int([Enter day to match])

The second Int is in case a user tries to enter a time when prompted for a date