Simply querying date/time field for particular date with parameter query

  • Thread starter Thread starter Brian
  • Start date Start date
B

Brian

I think this is an easy one!

I am querying on a date time field with e.g. 21/12/2003 07:00:00 and
just simply looking to filter for all times on a specific date using a
parameter query.

I know I could create a calculated field using INT but I'm sure there
is an easier way than that. However I think I don't think that worked
because of the data type situation. Presumably using ROUND is not
appropriate.

Also tried criteria 'between [date1] and [date1]+1' but this is
rejected.

I will be using MS Query grabbing the info from an Oracle database but
getting it to work in Access would be a start!

I would really prefer to use a specific criteria rather than create an
additional calculated field but am interested in what's recommended.

Thanks

Brian
 
I would really prefer to use a specific criteria rather than create an
additional calculated field but am interested in what's recommended.

You can use
= CDate([Enter date:]) AND < DateAdd("d", 1, CDate([Enter date:]))

The CDate() calls just protect you from the user entering a date in an
ambiguous format; it will convert the user's input to date/time format
using their regional setting.
 
Back
Top