1. Registered User
Join Date
Aug 2003
Location
WV
Posts
2

I've lost my desk notes regarding the format for calculating age in a report. I'd like to be able to insert an age calculation using a date in the future and subtracting the date of birth (i.e., 07/11/2003 - 08/15/1987). Thanks for any help.

2. Registered User
Join Date
Jul 2003
Location
Amsterdam, Nederland
Posts
450

## Try this 1

DateDiff("yyyy", first date ,NOW)

first date = input date
second date = from wher you want 2 count

so if i do this

DateDiff("yyyy", #08/15/1987#,#07/11/2003#)

it reteurns : 16

watch out with the following if you give the date

12/31/2003 and compare with 01/01/2004 it will give 1 year
or 1 month (MM instead of YYYY) or 1 day with DD

3. Registered User
Join Date
Aug 2003
Location
WV
Posts
2

## Re: Try this 1

Originally posted by Marvels
DateDiff("yyyy", first date ,NOW)

first date = input date
second date = from wher you want 2 count

so if i do this

DateDiff("yyyy", #08/15/1987#,#07/11/2003#)

it reteurns : 16

watch out with the following if you give the date

12/31/2003 and compare with 01/01/2004 it will give 1 year
or 1 month (MM instead of YYYY) or 1 day with DD

I'm not getting the correct age (i.e., date of birth 08/15/1987 and use 01/11/2004 as the second date). I need the answer to be 16 since he will not be 17 till his birthday. Thanks again.

4. Registered User
Join Date
Jul 2003
Location
Amsterdam, Nederland
Posts
450

## Thats what i said

Youl have to take the month week or day if you want to calculate the excact age

just divide the outcome by 12,52 or 365

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•