Detecting the current year?

Ecron

Registered User.
Local time
Today, 03:36
Joined
Aug 31, 2006
Messages
58
Hello.

Just wondering if there was a way to detect the current year? (2006, obviously). Reason being, have an input date of year a block of trees was planted and i want to have an automatic calculation for the 'age of trees'.

Thanks!
 
You can use the date function that is part of access and just grab the year out of it with something like:
Right(date, 4)
 
or you can use

Code:
Year(Date)

Col
 
And hey, if you want to get crazy you could use DatePart("YYYY", Date)
 
Last edited:

Users who are viewing this thread

Back
Top Bottom