parsing date field

  • Thread starter Thread starter TKai
  • Start date Start date
T

TKai

I have a record created date field. On the form its
default value is NOW(). The problem is when I try to run
a query to show only records created between specific
dates I do not get the records I expect. How do I parse
the field to return only the date?

Thanks so much.
 
I have a record created date field. On the form its
default value is NOW(). The problem is when I try to run
a query to show only records created between specific
dates I do not get the records I expect. How do I parse
the field to return only the date?

Thanks so much.

Three ways...

If you only want the date field in the record, use Date() as the
default instead of Now().

Or, in your Query, put your criterion on a calculated field

DateOnly: DateValue([datetimefield])

Or, use a criterion of
= CDate([Enter start date:]) AND < DateAdd("d", 1, DateValue([Enter end date:]))

to include times on the end date past midnight.
 
Back
Top