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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding Dates?

Status
Not open for further replies.

Toby1kenobe

Instructor
May 26, 2002
66
GB
I need to search records by specific dates, i can't get this to work because the dates include hours and minutes. I want to put in 14/7/03 and get results. How can i simplify the dates stored, or how do i search less specifically?

Thanks
Toby
 
To include times, specify them in your query e.g. SELECT ... WHERE MyDate BETWEEN #01/01/80 09:00:00# AND #01/02/80 09:00:00#

Or, do not use the time part to do a pure date comparison e.g. SELECT ... WHERE MyDate BETWEEN #01/01/80# AND #01/02/80# - this will match all times between 0:00:00 and 23:59:59
 
Toby

Try the following...

[tt]SELECT * FROM tblToSearch WHERE Format(theDateField,"DD/MM/YY") = #14/07/03#;[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top