Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Karahs
Partner - Creator
Partner - Creator

Difference between two dates

hello everyone,

I need to findout difference between Completed and alloted date on based of selection of empid.

Status           CreatedDate

Completed     9/2/2016

Alloted           9/23/2016

Thanks

1 Solution

Accepted Solutions
maxgro
MVP
MVP

maybe (it depends on your selection)

max({$<Status={'Completed'}>} CreatedDate) - max({$<Status={'Alloted'}>} CreatedDate)

if you have dates, you can use math to find the difference

View solution in original post

8 Replies
lakshmikandh
Specialist II
Specialist II

Interval(if(match(Status,'Completed'),CreatedDate)-

if(match(Status,'Alloted'),CreatedDate),'d')

Karahs
Partner - Creator
Partner - Creator
Author

What is that 'd' for?

maxgro
MVP
MVP

maybe (it depends on your selection)

max({$<Status={'Completed'}>} CreatedDate) - max({$<Status={'Alloted'}>} CreatedDate)

if you have dates, you can use math to find the difference

Karahs
Partner - Creator
Partner - Creator
Author

Doesnt work

nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

May be like this :

if Every employee has single date use below one :

Only({<Status={'Alloted'}>}CreatedDate) - Only({<Status={'Completed'}>}CreatedDate)

and

if Every employee has multiple dates use below one :

Max({<Status={'Alloted'}>}CreatedDate) - Max({<Status={'Completed'}>}CreatedDate)

I hope this may helps

-Nagarjun

Not applicable

Try interval(date(Completed,'DD-MM-YYYY')-date(Allotted,'DD-MM-YYYY'),'d').

Here I am assuming that you have two (Completed and Allotted) different fields and you are looking for difference in these dates.

Thanks,

Karahs
Partner - Creator
Partner - Creator
Author

Thankyou Maxgro ,it worked.