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: 
ashtrik203
Contributor
Contributor

Age in days for specific dates

Hello,

I need to create two ages for people.

I have persons age today.

I need persons age in DAYS on 1-01-2021(sta) and age on 31-10-2022(end). 

How would I create this? I want it specifically to be in DAYS and am okay with approximation as I do not have DOB.

Something like this

ashtrik203_0-1667433114207.png

Thanks

Labels (6)
2 Replies
Thiago_Justen_

Hi there.

 

Are you asking for an interval between two dates?

Interval(end-sta,'dd')

Cheers

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
BrunPierre
Partner - Master II
Partner - Master II

If I understood correctly, like this 

LOAD *,
//Determine the age in days by multiplying the years by 365.24
Num(Age(Now(),sta) * 365.24,'#,###.') as sta_Age_In_Days, 
Num(Age(Now(),end) * 365.24,'#,###.') as end_Age_In_Days  

Inline [
Case, sta, end
1, 27681, 29220
2, 23742, 24645
3, 27243, 28634
3, 27243, 28634
4, 27091, 29220
5, 28187, 29220];

EXIT SCRIPT;

BrunPierre_0-1667455719675.png