Hello everyone,
I need some help with an age query.
Here is the situation:
I have a date of service [DOS] and a date of birth [Birth Date]
I'm trying to calculate the age at the last day of the date of service year not the current year.
Example:
[Birth Date] = 6/25/1993
[DOS] = 10/18/2013
Age at the last day of the date of service year (12/31/2013) = 20
Having a hard time figuring out how to do this. I tried
but this does not work correctly.
Any help would be greatly appreciated.
Thank you,
Rich
I need some help with an age query.
Here is the situation:
I have a date of service [DOS] and a date of birth [Birth Date]
I'm trying to calculate the age at the last day of the date of service year not the current year.
Example:
[Birth Date] = 6/25/1993
[DOS] = 10/18/2013
Age at the last day of the date of service year (12/31/2013) = 20
Having a hard time figuring out how to do this. I tried
Code:
DateDiff("yyyy",[BIRTH DATE],[DOS])+Int(Format([DOS],"mmdd")<Format([BIRTH DATE],"mmdd"))
Any help would be greatly appreciated.
Thank you,
Rich