AGE

AGE(birthday, date_format)
Returns the age of someone given their birthday.

birthdayThe birthday of the person.
date_formatThe date format "UK" or "US".

REMARKS
* If "birthday" is after todays date, then a negative value is returned.
* If "date_format" is left blank, then "UK" is used.
* The equivalent VBA function is AGE

 A
1=JS.AGE("1 Jul 1977") = 47
2=JS.AGE("1/7/1977") = 47
3=JS.AGE("1/7/77") = 0
4=JS.AGE("1/11/1977") = 47
5=JS.AGE("1/11/1977", "UK") = 47
6=JS.AGE("1/11/1977", "US") = 48
7=JS.AGE("11/1/1977", "UK") = 48
8=JS.AGE("11/1/1977", "US") = 47
9=JS.AGE("01/02/1920", "UK") = 105
10=JS.AGE("15 March 1976", "UK") = 49
11=JS.AGE("1 January 2050") = -25
12=JS.AGE(1/7.1977) = 125
13=JS.AGE(126212) = -221

1 - What is the age of someone who has a birthday on "1/11/1977".
2 - What is the age of someone who has a birthday on "11/1/1977".



© 2025 Better Solutions Limited. All Rights Reserved. © 2025 Better Solutions Limited TopPrevNext