How to make time calculation

amator

Registered User.
Local time
Tomorrow, 01:17
Joined
Aug 1, 2006
Messages
23
Hi.
I'am trying to count: todays date -12 month.
So how I tell access that I want answer which date is year from this date?
Or how I must "write" 12 months in SQL?
 
Access help has the answer under DateAdd()

Code:
= DateAdd("yyyy", 1, [YourDate])

Col
 
Thank you

ColinEssex said:
Access help has the answer under DateAdd()

Code:
= DateAdd("yyyy", 1, [YourDate])

Col


I'm not the user who posted this question, but I want to say thank you anyway. I've been trying to come up with a reliable way to query "the last 2 years" in a database where everythying is applied to the first of a month and your tip helped me to come up with DateAdd("m",-23,[LatestDate]) which solves my problem.
 

Users who are viewing this thread

Back
Top Bottom