DATEDIFF in a Form Help please

Rogueci5

Registered User.
Local time
Tomorrow, 08:18
Joined
Aug 2, 2010
Messages
41
Hi all :)

I have this in a form =DateDiff("yyyy",[YEAR],Date()) and the YEAR field is 1989 for the first record, it changes for each ofcourse.

Thsi should work? but I get a constant 105 years returned lol I just need to know the age of items from the YEAR field till today in Years. 10 years etc.
 
If your YEAR field is not in a date format then you will get the incorrect error. If your YEAR field is 1989 an integer then you can use the following to determine the age =Year(Date())-[year]
 
If your YEAR field is not in a date format then you will get the incorrect error. If your YEAR field is 1989 an integer then you can use the following to determine the age =Year(Date())-[year]

Thank you I had a look at that and yes its a number field, THANK you so much!! been hours over this, will go try it now


Cheers
Muchly Appericated!!
 
Also note that year is a Reserved Word in Access and should not be used as a field name! Sooner or later the Access Gnomes will choke on it and cause you problems. Add something to it as a modifier and you'll be OK.

Linq ;0)>
 

Users who are viewing this thread

Back
Top Bottom