R
Ronster
I'm running a query that requires that I convert a YYYYMMDD text
formated field to a valid date, then use the converted date to
determine the person's current age. I'm creating a new field with this
expression:
Assume today's date is 7/12/06 and Date of Birth to convert is
19651204, then I run it through the following formula:
DateDiff("yyyy",CVDate(Mid$([Date of Birth],5,2) & "/" & Mid$([Date of
Birth],7,2) & "/" & Mid$([Date of Birth],1,4)),Date())
Calculated Age shows 41
Yes, 2006 - 1965 does = 41 BUT his birthday is on Decemeber 12th. The
calculated age should show 40. All the dates past 7/12/06 show this
extra year.
I tried creating separate fields for the converted DOB and Today's
date, then run DateDiff on just these fields but I get the same result.
Ran the same dates in Excel with DateDif and get 40 years old, all
dates were correct.
Anybody have any ideas why this is?
formated field to a valid date, then use the converted date to
determine the person's current age. I'm creating a new field with this
expression:
Assume today's date is 7/12/06 and Date of Birth to convert is
19651204, then I run it through the following formula:
DateDiff("yyyy",CVDate(Mid$([Date of Birth],5,2) & "/" & Mid$([Date of
Birth],7,2) & "/" & Mid$([Date of Birth],1,4)),Date())
Calculated Age shows 41
Yes, 2006 - 1965 does = 41 BUT his birthday is on Decemeber 12th. The
calculated age should show 40. All the dates past 7/12/06 show this
extra year.
I tried creating separate fields for the converted DOB and Today's
date, then run DateDiff on just these fields but I get the same result.
Ran the same dates in Excel with DateDif and get 40 years old, all
dates were correct.
Anybody have any ideas why this is?