Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

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

Calculate Age at the time of hospital admission

you have to provide more inof.

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

Not applicable

Calculate Age at the time of hospital admission

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

Re: Calculate Age at the time of hospital admission

Hi,

You can use  the following expr to calculate age

year(Date_of_Admission) - year(DOB)

See attached file

Cheers

Arun

Not applicable

Re: Calculate Age at the time of hospital admission

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

Not applicable

Calculate Age at the time of hospital admission

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

Not applicable

Calculate Age at the time of hospital admission

other way is:

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