DateAdd in a query (1 Viewer)

JRPMD

Registered User.
Local time
Yesterday, 20:11
Joined
Nov 24, 2012
Messages
52
Hello , I have a table with date and time fields and need to retrieve the records within 24 hs from de first record.
I tried DateAdd (h , 24, [FirstDate] ) with many variants as a criteria in a query and even as VBA code , but doesn't work.
Can you help me?
 

sneuberg

AWF VIP
Local time
Yesterday, 20:11
Joined
Oct 17, 2014
Messages
3,506
Maybe something like:

Code:
Between [FirstDate] And DateAdd ("h" , 24, [FirstDate] )
 
Last edited:

sneuberg

AWF VIP
Local time
Yesterday, 20:11
Joined
Oct 17, 2014
Messages
3,506
Please note that I edited my previous post adding quotes around h in the DateAdd function
 

Users who are viewing this thread

Top Bottom