Querying a date and time stamped field

mattw

New member
Local time
Today, 20:27
Joined
Nov 11, 2008
Messages
2
I'm writing a query to pick up all records created yesterday. The records are date and time stamped thus:- dd/mm/yyyy hh:mm:ss
Normally if I were trying to retrieve records on a date only stamped field I'd use 'date()-1' in the criteria field to pick up any records created yesterday but when I try this on the dd/mm/yyyy hh:mm:ss field I get no records returned. In order to try and get round this problem I resorted to using '>=[Enter Date]' and I manually enter yesterdays date but I want to understand how to retrieve these records. I must be missing something easy so would be grateful for any help.
 
Try this as column expression:
Code:
your_timestamp_field: DateValue([your_table].[your_timestamp_field])
with the Date()-1 condition.
 
Thabks for the reply but I've misled you a little, the field is just a date / time field as dd/mm/yyyy hh:mm:ss. Will the above solution work?
 
Last edited:

Users who are viewing this thread

Back
Top Bottom