Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date/Time field

Status
Not open for further replies.

gillianleec

Technical User
May 7, 2003
48
US
I want to run a query that captures records that have a date and any time during that day. I am currently using
>=Date(). I would like to use a between statement but not sure what to write. Any ideas?
 
Between [Enter Start Date] And [Enter End Date] +1

That should do it.

Paul
 
That worked for a number field. For a date field I had to use
Between [Enter Start Date] And DateAdd("d",1,[Enter End Date])

Paul
 
Code:
Between [Enter Report Date] & " 00:00" And [Enter Report Date] & " 23:59"

Hoc nomen meum verum non est.
 
I prefer to create calculated column in the query
DateOnly: DateValue([DateField])
then set the criteria to a date only value.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Thanks for all the suggestions. They all worked for what I need!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top