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

Date functions for reports

Status
Not open for further replies.

slames

Technical User
Nov 5, 2002
211
GB
I want to be able to produce a report listing all items sent out today. The field I am referring to is a datetime field. When I add =date() to the criteria of the sql for the record source, it comes up the the error unrecognised function, and if I use the now() function it pulls through nothing as it tries to match the time now too. How can I use sql to pull out items sent out today and therefore only equal the date half of this field. If I add > 08/04/2003 00:00 this works but I want to be able to just print off the report every day without having to change the date each time.
Any help gratefully received.
Thanks
Steph
 
Try this as your criteria:
Code:
Between Date() & " 00:01" And Date() & " 23:59"
 
This still generates an error:
Your entry cannot be converted to a valid datetime value.

Any ideas what could be causing this?

Thanks
Steph
 
the format is dd/mm/yyyy 00:00
 
Take a look at your system's date settings under Regional options. It appears there is a conflict between your PC and what you have defined in your database....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top