Calulation on Date

G

Guest

I have a table that keeps track of comp time.
What I need is a query that returns all the data that is over 90 days old.
Table Info.
Employee#
Control# (primary key)
Hours
Date

example of data
513624 06-55129 10.5 1/1/06
513624 06-66325 2.1 10/6/06

When i run the query I should get the 1/1/06 but not the 10/6/06.
 
G

Guest

Try this --
SELECT Michelle_1.[Employee#], Michelle_1.[Control#], Michelle_1.Hours,
Michelle_1.Date
FROM Michelle_1
WHERE (((Michelle_1.Date)<Date()-90));

You should not use Date as a field name as it is a reserved word in Access
and therefore could cause problems.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top