How to calculate age from a date format mm/dd/yy

hzeigler4

Registered User.
Local time
Today, 00:22
Joined
Apr 18, 2007
Messages
42
This is driving me crazy! I have a table that contains the DOB of students in this format: mmddyy. It is a two digit year. How can I calculae the student's age? I cannot use the date diff function because that only works on a four digit year. HELP PLEASE!
 
you cant use datediff, not because its not a 4 year date, but because a date formatted as ddmmyy isnt a vba date type variable

is your date a string, or a number

look at using dateserial, to change it into a date, then use datedifff from there.
 
Datediff will not calculate age correctly, but there are many methods on the forum so search on age calculation.

Brian
 
yes it is stored as text. I will try out date serial. Never used it before. Thanks
 
whoo hoo! Worked like a charm! And I learned something new!! Thanks a million!
 
Tell me that you didn't just use datediff, but did check whether the birthday had been reached or not?

Brian
 

Users who are viewing this thread

Back
Top Bottom