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

Date Function

Status
Not open for further replies.

hianjali

Programmer
Jan 5, 2006
29
US
Hello,

I am using MS Access 97. I need to pull out the records which has effective date more than 6 months from todays date.. i wrote my query as follows

SELECT elgdep.MEM_SOC_SEC_NUM, elgdep.MEM_DEP_CODE, elgdep.MEM_BIRTH_DATE, elgdep.MEM_EFFEC_DATE
FROM elgdep
WHERE (((elgdep.MEM_EFFEC_DATE)>DateAdd('m',6,[Today's Date])));

I get an error...but if i change DateAdd to DateDiff it works but gives me wrong data...please someone help
 
hianjali
Try...
WHERE (((elgdep.MEM_EFFEC_DATE)>DateAdd("m",6,Date()))

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top