Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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')