Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlikheads
can any one help me ,How to get the difference between two dates like YY-MM-DD?
Thanks
John
Hi,
Use like Date(Date#('Today()','YY-MM-DD') - Date#('14-12-12','YY-MM-DD') , 'MM/DD/YYYY')
For more info check the blog mentioned below
Thanks,
Vignesh
you can use the internal function Age(param1,param2) where param1 and param2 are your two dates. It returns the difference in number of days. There is also a macro that can return years, months, days of difference.
sorry is in years not days.
ie:
age('2007-10-29', '2005-10-29') returns 2
you can also check these threads:
Difference between two dates in Year,Month and ... | Qlik Community
if both are in same format then
you could use
date1-date2 as diffrence
other wise
DATE(date1,'YY-MM-DD') - DATE(date2,'YY-MM-DD') AS DIFFERENCE
OR
interval(Date1-Date2,'DD')
or
age(Date1,date2)
or
DATE(date#(date1),'YY-MM-DD') - DATE(Date#(date2),'YY-MM-DD') AS DIFFERENCE
hope this helps