January 12, 200422 yr 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
January 12, 200422 yr 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
January 12, 200422 yr Author 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
January 12, 200422 yr MonthofBirth, text, data=04 DayofBirth, text, data=01 YearofBirth, text, data=1966 Date(MonthofBirth, DayofBirth, YearofBirth) should lead you there ?
January 12, 200422 yr 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
January 12, 200422 yr Author Yes, this works...Date(MonthofBirth, DayofBirth, YearofBirth)...don't know what I was doing before Thanks. Susan
Create an account or sign in to comment