# Calculating age

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

## Recommended Posts

Hi there

I found the following calculation on a post on here and I have been trying to modify it so that I can calculate someones age based on the current date. This way their age will update each year in relation to the current date.

However, out of 10 I would say i'm at level 2 or 3 so I don't fully understand it and it doesn't work when I modify it.

Year(Date( 8; 1; Year(Get(CurrentDate)) + (GetAsNumber(Get(CurrentDate)) > GetAsNumber(Date( 8; 1; Year(Get(CurrentDate))) )) )) - Year(birthdate) -

(GetAsNumber(Date( 8; 1; Year(Get(CurrentDate)) + (GetAsNumber(Get(CurrentDate)) > GetAsNumber(Date( 8; 1; Year(Get(CurrentDate))))) )) < GetAsNumber(Date(Month(birthdate); Day(birthdate); Year(Date( 8; 1; Year(Get(CurrentDate)) + (GetAsNumber(Get(CurrentDate)) > GetAsNumber(Date( 8; 1; Year(Get(CurrentDate))) ))) ))))

I also tried a simple calculation:

Todays date - birthdate

But the result isn't quite working out.

I have trawled through other posting but I can't seem to find anything that will help me.

##### Share on other sites

GetAsNumber(Year(Get(CurrentDate)) -

Year(DOB) - Case(Get(CurrentDate) <

Date(Month(DOB); Day(DOB); Year(Get(CurrentDate))); 1; 0))

##### Share on other sites

You're a star!!! If you lived locally i'd buy you a pint the next time you're out in Manchester!!!

Much appreciated.

##### Share on other sites

I just got back from the UK a few months ago and am visiting again probably at the end of the summer. So, I may have to take you up on the offer.

##### Share on other sites

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

## Create an account

Register a new account