Adding a year to the current one?

sp00k

Registered User.
Local time
Today, 11:21
Joined
Jan 12, 2009
Messages
40
Hello, I have a field where it says date a certificate was purchased, but I would like another field that displays the same date, but only a year from when it was purchased.

AnnualInspectionCertificateExpiry is the name. I've tried adding 0/0/1 but it doesn't seem to work.

Thanks!
 
Lookup the Dateadd function in the access help, you will love it
 
Heh, I just found it.
DateAdd("M",12, tblVehiclesDatabase.AnnualInspectionCertificateExpiry) As AnnInnDueDate

Seems to work, I tried "Y", 1 but that only changed the day for some reason..?
 
"Y" means day of year, "YYYY" means year.
 
RTFM or... read the help on what parameters you can use

for year it is "YYYY"
 
RTFM... Microsoft must have missed putting a manual in my access packaging.
I had my date formatted YY so i thought YYYY, I wouldn't work, didn't explain that in the help files.
 
From the access help:
Setting Description
yyyy Year
q Quarter
m Month
y Day of year
d Day
w Weekday
ww Week
h Hour
n Minute
s Second
 
RTFM... Microsoft must have missed putting a manual in my access packaging.
I had my date formatted YY so i thought YYYY, I wouldn't work, didn't explain that in the help files.


By Manual (these days anyway) I think he means use the Help Option and read the results
 

Users who are viewing this thread

Back
Top Bottom