General discussion

Locked

Helps with Access

By cmorus ·
A couple of years ago I created a field with the following formula:

=INT(DATEDIFF)("y;[DATEOFBIRTH],Date())/365)

to determine the age. Recently we started getting an error message: #NAME?

I've re-chosen the field names, but am still getting the error. I no longer do much with Access and cannot figure out the problem. Any ideas? Thanks so much.

This conversation is currently closed to new comments.

25 total posts (Page 1 of 3)   01 | 02 | 03   Next
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Helps with Access

by Rajaragavan K In reply to Helps with Access

Can You please give some more details like is the DATEOFBIRTH is a field in any table and what is the data type of that like this.

Collapse -

Helps with Access

by cmorus In reply to Helps with Access

Poster rated this answer

Collapse -

Helps with Access

by RSV In reply to Helps with Access

HI
Try this....


date1="8/20/1970"
date2="8/20/2000"


=int(datediff("y",date1,date2)/365)

its returns 30.

Good Luck...:)

Collapse -

Helps with Access

by cmorus In reply to Helps with Access

Poster rated this answer

Collapse -

Helps with Access

by cmorus In reply to Helps with Access

This formula was designed to calculate a student's age based on today's date. Thanks.

Collapse -

Helps with Access

by Glen_McLeod In reply to Helps with Access

RSV got it right, you've inversed one of your parentheses and you forgot the closing quote for the 'y'.

Glen

Collapse -

Helps with Access

by cmorus In reply to Helps with Access

Poster rated this answer

Collapse -

Helps with Access

by DKlippert In reply to Helps with Access

You've lost a " mark and gained a ). Try this:
=INT(DATEDIFF("y", [DATEOFBIRTH], Date())/365)

Collapse -

Helps with Access

by cmorus In reply to Helps with Access

Poster rated this answer

Collapse -

Helps with Access

by donq In reply to Helps with Access

=Int(DateDiff(?y?, [DATEOFBIRTH], Date())/365) & ? years ? & DatePart(?m?, Date())-DatePart(?m?, [DATEOFBIRTH]) & ? months.?

The above returns ?64 years 6 months.? when [DATEOFBIRTH] is a Date/Time field formatted Short Date.

Back to Software Forum
25 total posts (Page 1 of 3)   01 | 02 | 03   Next

Related Discussions

Related Forums