Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculate Age at the time of hospital admission

Is it possible in QlikView to calculate a patient's age in years at the time of  hospital admission? 

I need help with the expression using the 2 dates:  DOB and Admission_date_time.

Is this done in a list box or table? 

I'm working on my very first QlikView project and seem to be stumped.

Thank you, Sue

6 Replies
Not applicable
Author

you have to provide more inof.

e.g. how may data tables are you using?

Not applicable
Author

Hi:

You can use age function to calculate age in years.

Syntax:  age(Admission_date_time, DOB)

It depends on the way you would like to report this value in the Dashboard i.e. as a list box or in chart.

Hope it helps..

--Narasimha K

Not applicable
Author

Hi,

You can use  the following expr to calculate age

year(Date_of_Admission) - year(DOB)

See attached file

Cheers

Arun

Not applicable
Author

its better to use the age () function as suggested by Narasimha.

Not applicable
Author

Thank you for your help.  I used year(Date_of_Admission) - year(DOB) in my data script.

Not applicable
Author

other way is:

timestamp(Date(Date_of_Admission) - Date(DOB), 'Y')