Hi all, i would like to ask how to calculate age based on the year of birth, instead of birthday date? which extract from Malaysia IC number.
For example :
ic number: 161214-07-0109, the age follow birthday the result is "5" .
if I want to follow the year of birth supposedly is "6 ".
my current formula is stated as below: =DATEDIF(DATE(IF(LEFT($F16)="2","20",IF(LEFT($F16)="1","20",IF(LEFT($F16)="0","20","19")))&LEFT($F16,2),MID($F16,3,2),MID($F16,5,2)),TODAY(),"Y")
Hi,
Am Wed, 7 Sep 2022 01:41:41 -0700 (PDT) schrieb Khor Kang Xian:
Hi all, i would like to ask how to calculate age based on the year of birth, instead of birthday date? which extract from Malaysia IC number.
For example :
ic number: 161214-07-0109, the age follow birthday the result is "5" .
if I want to follow the year of birth supposedly is "6 ".
my current formula is stated as below: =DATEDIF(DATE(IF(LEFT($F16)="2","20",IF(LEFT($F16)="1","20",IF(LEFT($F16)="0","20","19")))&LEFT($F16,2),MID($F16,3,2),MID($F16,5,2)),TODAY(),"Y")try: =DATEDIF(DATEVALUE(MID(F16,5,2)&"/"&MID(F16,3,2)&"/"&IF(LEFT(F16,2)>=TEXT(TODAY(),"yy"),19,20)&LEFT(F16,2)),TODAY(),"y")
Regards
Claus B.
--
Windows10
Microsoft 365 for business
DATEVALUE parameter '14/12/2016' cannot be parsed to date/time.
just for your information, the identity card number in malaysia is YYMMDD- XX-XXX for example 161214-08-0202, mean born in 14 dec 2016 .
DATEVALUE parameter '14/12/2016' cannot be parsed to date/time.
just for your information, the identity card number in malaysia is YYMMDD- XX-XXX for example 161214-08-0202, mean born in 14 dec 2016 .
Op do 08-09-2022 om 06:02 schreef Khor Kang Xian:
DATEVALUE parameter '14/12/2016' cannot be parsed to date/time.
just for your information, the identity card number in malaysia is YYMMDD- XX-XXX for example 161214-08-0202, mean born in 14 dec 2016 .Try =MOD(DATEDIF(DATEVALUE(MID(F16,5,2)&"-"&MID(F16,3,2)&"-"&19&LEFT(F16,2)),TODAY(),"y"),100)
--
Ale
Op do 08-09-2022 om 06:02 schreef Khor Kang Xian:
DATEVALUE parameter '14/12/2016' cannot be parsed to date/time.
just for your information, the identity card number in malaysia is YYMMDD- XX-XXX for example 161214-08-0202, mean born in 14 dec 2016 .Try =MOD(DATEDIF(DATEVALUE(MID(F16,5,2)&"-"&MID(F16,3,2)&"-"&19&LEFT(F16,2)),TODAY(),"y"),100)
--
Alex.
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 715 |
| Nodes: | 16 (2 / 14) |
| Uptime: | 21:34:01 |
| Calls: | 12,104 |
| Calls today: | 4 |
| Files: | 15,004 |
| Messages: | 6,518,113 |