Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, Is there a simple formula/expression for computing age in years if you have a dateofbirth field provided?
I gave a colleague a simple dual if statement about if dateofbirth>=, < 365.25*18 days to make a yes/no field about person being 18, but it might miss by a fraction of a day or something and wondering if we have something silly like an aghe(dateofbirth) function laying around.
(Note the sentence was not the actual dual statement, I just typed it out phoenetically here.
)
How about the age function?
it calculates the age:
age(today(),date) as age
Regards
Try this:
=year(now()) - year(dateofbirth)
Enrique
How about the age function?
it calculates the age:
age(today(),date) as age
Regards
Thanks, next time I'll just try typing the obvious in script and see if autofill suggests the function for me. I told my colleague before posting here, 'I'll check on qlikcommunity in case there's something silly easy like age()'.. Completely unexpected.
I tested in a textbox for myself, with today's date and a birthday earlier and later than today, and it worked fine.