Between Date AND Time Parameter Query

EdwardsC

New member
Local time
, 20:55
Joined
Jul 10, 2019
Messages
21
I can set up a parameter query to filter between dates but is there a way to filter between dates & times I.e 06/26/22 08:00:00 AM to 06/27/22 08:00:00 PM?
 
yes - the same way - if your date and time fields are separate, then just add them together
 
A Date field holding only a date is merely a Date field for which the fraction has been removed - because the fraction represents time of day in the same field.
 
I can set up a parameter query to filter between dates but is there a way to filter between
yes you can and i don't think you need to separate the date and time components to another field.
but don't use Between in your criteria.
use, this format for your criteria:

>=[StartDate] And <=[EndDate]

and you must type Exact format as you have on the date field.
 
Last edited:
The dates are stored internally as double precision numbers with the integer being the number of days after or before (negative numbers) 12/30/1899 and the decimal is the fraction of the day. So, .5 is noon and .25 is 6 AM and .75 is 6 PM. It is those pesky tiny fractions that may make the Between not work as you expect it to so the >= and <= method is always safer.
 

Users who are viewing this thread

Back
Top Bottom