Date expiry

kabir_hussein

Registered User.
Local time
Today, 00:39
Joined
Oct 17, 2003
Messages
191
Hi I am doing a date expiry query which has worked for one of my other queries i have copied the same criteria for another table but for some reason it does not work now

Below is the SQL i am using

SELECT Computers.[Machine ID], Computers.[Machine Type], Computers.User, Computers.Department, Computers.[Installed Applications], Computers.[Serial Tag], Computers.[OS Installed], Computers.[Pc Brought]
FROM Computers
WHERE (((Computers.[Pc Brought]) Between DateAdd("d",30,Date()) And DateAdd("d",-30,Date())));

I have 3 records which are within the criteria but for some reason i do not get these.

Any idea why this does not work but works for my other query


Many thanks
 
Try switching the 30 and -30 around, have the -30 first and the 30 last
 
Hi

Many thanks for the reply i realised what the problem was it was due to having that field as a text form not a date/time. hence it worked for one table and not another

Thanks once again
 

Users who are viewing this thread

Back
Top Bottom