Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculating Age

Hi:

     I need to calculate the age based on the DOB (format: YYYY-MM-DD) that I pull out from my DB. FieldName "MBR_DOB". Any ideas will be greatly appreciate.

Thanks

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

well you can try an expression like that:

Year(Today()) - Num(Left(MBR_DOB,4))

Hope it helps

regards

Giampiero

View solution in original post

5 Replies
alexandros17
Partner - Champion III
Partner - Champion III

There is a date and time funcition AGE

Not applicable
Author

Hi,

well you can try an expression like that:

Year(Today()) - Num(Left(MBR_DOB,4))

Hope it helps

regards

Giampiero

Not applicable
Author

Thanks Giampiero:

     Work perfectly. Thanks a lot.

Best Regards

CyberDan

Not applicable
Author

Hi,

Glad to helped you.

Honestly, I think Alexandros solution is better than mine.

Try this way:

Age(Today(),MBR_DOB)

It should work.

Best regards

Giampiero

Not applicable
Author

     Both options work fine. Thanks Alexandros for your help

Thanks for your time.

CyberDan