query using two dates and time range

sumukhreddy

New member
Local time
Today, 22:23
Joined
Mar 9, 2016
Messages
6
hi All,

first of all i would like to say thank you for your kind help for my previous problems.

i need one more suggestion. i need to pull data from table, where the data needs to be limited to be inbetween a specific range of dates and times like, say ill need to see only those records that were entered sometime between 23-Mar-2016 3:00am to 24-Mar-2016 3:00am. (I work overnights, so i start on monday and go hometuesday for example). in the database i have 2 columns, both are set todate/time, one column currently holds just the date, and one holds just thetime. I tried as below:

In query i've add a calculated field and then search against that
Field: [SUB Date] + [SUB Time]
Criteria: Between #DATE()-1 3:00AM # and #DATE() 3:00am#

but i'm getting syntax error. please help me:banghead::confused:
 
Criteria: Between (Date() + TimeValue("3:00 am")) And (Date()+1 + TimeValue("3:00 am"))
 
hi

You are super, brilliant

Thank you very very much for your prompt help.

Thanks a lotttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt;)
 

Users who are viewing this thread

Back
Top Bottom