I want to calculate a persons age based on a birthdate in ms access this is what i have tried
开发者_Python百科DateDiff("yyyy", [birthdate], Now())+ Int( Format(now(), "ddmm") < Format( [birthdate], "ddmm") )
But it gives me the error:
The expression you entered contains invalid syntax.
Can anyone tell me what's wrong and how to change it?
From: http://www.tek-tips.com/faqs.cfm?fid=85
''True = -1, False = 0
Age = DateDiff("yyyy", Birthdate, Date) + _
(Date < DateSerial(Year(Date), Month(Birthdate), Day(Birthdate)))
精彩评论