Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

Help to work out age as of a specific date

Hi all,

I have some data which includes employees DOB. I need to create a new field for 'Age' which needs to work out their age as of a specified date. 

eg. 

AsOfDate = 05/04/2019

Employee 1 DOB = 11/06/1984

So their age as of now is 35 but as of  05/04/2019 it was 34, so i need the new 'Age' field to populate 34. 

Can anyone help please?

I have attached an example. 

1 Solution

Accepted Solutions
Vegar
MVP
MVP

There is an age() function available in QlikView.

To get todays age use it like this:

 

age(today(),DOB)

 

Age per '05/04/2019'

age('05/04/2019',DOB)

image.png

 

Read about age function here: https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/DateA...

View solution in original post

2 Replies
Vegar
MVP
MVP

There is an age() function available in QlikView.

To get todays age use it like this:

 

age(today(),DOB)

 

Age per '05/04/2019'

age('05/04/2019',DOB)

image.png

 

Read about age function here: https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/DateA...

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Thats great, thanks, i wasn't aware of that.