HELP with query expression........

G

Guest

In the old Access database I could use this expression based on the date/time
field, Birth_date.

However...now that our medical school application went online this past
year..the birth date was divided into 3 separate fields (day...month...year)
and the datatype of these fields is number.

How, if possible, can I fix this expression based on this new format?

Age:
DateDiff("yyyy",[Birth_date],Now())+Int(Format(Now(),"mmdd")<Format([Birth_date],"mmdd"))
 
R

Rick Brandt

jacqueline said:
In the old Access database I could use this expression based on the date/time
field, Birth_date.

However...now that our medical school application went online this past
year..the birth date was divided into 3 separate fields (day...month...year)
and the datatype of these fields is number.

How, if possible, can I fix this expression based on this new format?

Age:
DateDiff("yyyy",[Birth_date],Now())+Int(Format(Now(),"mmdd")<Format([Birth_date],"mmdd"))

Every place you have [Birth_Date] substitute...

DateSerial([BirthYear], [BirthMonth], [BirthDay])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top