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/time problem.

Status
Not open for further replies.

Orcanut

Programmer
Sep 3, 2002
24
CA
I have a procedure which when certain criteria are met change a control to "date". The table where the "date" is stored is formated as a short date but basic date stamps the "date" with the time when the procedure runs. e.g. 11/06/02 "sometime". My Problem is when I run a query for a report using date "11/06/02" as a criteria it will not find the records where date is in long format 11/06/02 "sometime". I thought "date ()" was supposed to = "short date" and Now = "long date". When the time portion of the record is deleted the query works?

Any thoughts would be welcome.
 
In your criteria you could try something like this:
>=[date?] And <DateAdd(&quot;d&quot;,1,[date?])

where [date?] = 11/06/2002 or whatever criteria you are using.
 
Sometimes your date string needs to be enclosed with pound signs

I.E. #1/1/02#
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top