Jump to content

This topic is 7691 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have inherited a database and need to be able to calculate a student's current age. I wanted to just do a simple calc: (Today-DOB)/365. However, there is no DOB field. Instead, there is MonthofBirth, DayofBirth, and YearofBirth, all three of them text fields. I tried to write a calc: MonthofBirth &"/"& DayofBirth &"/"& YearofBirth, but it doesn't work.

What is the best way to get Current Age out of this?

Thanks,

Susan

Posted

I didn't test this, but off of the top of my head this should work.

Date(Month(MonthofBirth), Day(DayofBirth), Year( YearofBirth))

HTH

Lee

Posted

Thanks, but this doesn't work....

This fields look like this:

MonthofBirth, text, data=04

DayofBirth, text, data=01

YearofBirth, text, data=1966

So I want to end up with a date field that looks like this: 04/01/1966

Thanks again.

Susan

Posted

That's funny, it works for me.

What didn't work for you, the leading zeros. If so, you may have to adjust the Date format at the layout level.

Lee confused.gif

This topic is 7691 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.