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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
marco_puccetti
Partner - Creator
Partner - Creator

Date diff compute year

How can i do to make the year difference from 2 dates? I need it to compute the age.

Marco

14 Replies
Not applicable

for example,

year(date) - year(birthdate) - if(date < MakeDate(year(date), month(birthdate), Day(birthdate)), 1, 0)

if checks if persons birthday already was in this year or not

marco_puccetti
Partner - Creator
Partner - Creator
Author

Does the interval work with years?

Interval(Date1-Date2,'YYYY')


Marco

buzzy996
Master II
Master II

tht will give results some thing like this,

year.PNG

if tht's ur secnario,why can't use =Num(Year(Variable1)-Year(Variable2))?like this.

marco_puccetti
Partner - Creator
Partner - Creator
Author

With Age function it works.

Thanks

Not applicable

so cool, never heard about it