Chintsapete
Registered User.
- Local time
- Today, 22:26
- Joined
- Jun 15, 2012
- Messages
- 137
Hi all
I don't seem to find any query formula in the forum where the age changes on the date of birth. I tried all the once I could find but all of them seem to calculate the age as of 1 January. I find it a bit strange that it doesn't work. Anyone has a suggestion.
I got BirthDate and Date in the table I want to update the age column back in the history with an update query.
All the above change the age on January 1. It's not a train smash but weird.
Cheers
Pete
I don't seem to find any query formula in the forum where the age changes on the date of birth. I tried all the once I could find but all of them seem to calculate the age as of 1 January. I find it a bit strange that it doesn't work. Anyone has a suggestion.
I got BirthDate and Date in the table I want to update the age column back in the history with an update query.
Code:
Int(DateDiff("yyyy",[BirthDate],[Date]))
Code:
Int(DateDiff("d", [BirthDate], DateSerial(DatePart("yyyy,[Date]), 1, 1))/365.25)
Code:
Int(DateDiff("yyyy",[Birthdate],[Date]))+Int(Format([Date],"mmdd")<Format([Birthdate],"mmdd"))
All the above change the age on January 1. It's not a train smash but weird.
Cheers
Pete