Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi i am working from backend to calculate the age of person.
so i get the Year of birth from their ID like this
if(LEFT(nric_number,2)>text(date(TODAY(),'YY')),'19'&LEFT(nric_number,2),'20'&LEFT(nric_number,2)) as YearID
Then i want to minus today date with year only like this.
text(date(TODAY(),'YYYY')) - if(LEFT(nric_number,2)>text(date(TODAY(),'YY')),'19'&LEFT(nric_number,2),'20'&LEFT(nric_number,2)) as Age
But is not working. Please help me.