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

A date query

Status
Not open for further replies.

macky

Programmer
May 22, 2001
26
0
0
GB
i have a field in a database that has the date of issue date for a radio battery, these batteries a guarenteed for 12 months of use. What can I put in the query under this date field to sort the data for any date over 12 months when the date format is like 27/11/02.

Thanks for your prompt reply.
 
SELECT * FROM myTable WHERE issDate < Date() - 365 -- Just trying to help...
[wolf]<--- This is a wolf? We need a new icon.......
mikewolf@tst-us.com
 
Thanks for your help but I think I've made a pigs ear with your answer, in the query design view, I have a field called Battery start date, I changed the option for the Total field to &quot;Where&quot; and in the criteria field I put your expression <Date()-365. Unfortunately it didn't work, so I must be doing something wrong.

Can you help.
 

where datediff(&quot;d&quot;,startdate,date()) > 365


rudy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top