Calculating Date Difference

vadharah

Registered User.
Local time
Today, 05:41
Joined
Oct 14, 2008
Messages
35
Hi Guys,

I have a table called 'Monitors' one of the colums is a date and i want to return values with dates more than 6 months old.

i have this so far

SELECT *
FROM Monitors
WHERE DateDiff("m", #Date()#,#Household.date#) > 6;

what am i doing wrong here.

Thanx in advance
 
You don't need to put # chars around the date function. Also where are you getting houshold.date from? If it is a field in a table Household then you should change its name from date because Date is a reserved word and shouldn't be used for field names.

Finally if Household.date is a date type field in a table you don't need the # characters any way.
 

Users who are viewing this thread

Back
Top Bottom