Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dates comparison

Hi ,

I am new to Qlikview..


I Have one requirement like " Calls / complaints that take maximum resolution time "


In Excel Sheet there are two date columns like


Date 1             Date 2

----------------      ---------------------

08/09/2013       10/09/2013


So i Wanna display maximum resolution time like


I am excepting the following Result .Please let me know me how to calculate difference b/w two date values.


Date 1             Date 2                      Max days

----------------      -----------------             ----------------

08/09/2013       10/09/2013                   3

Please Give me any suggestions.

Regards,

Vinod

7 Replies
srchilukoori
Specialist
Specialist

Dates are stored as dual values. You can subtract Date2 from Date 1 directly and obtain the result.

e.g.:

Max Days = <Date 2> - <Date 1>

Additionally, you can use some formatting if needed

Max Days = Num(Date#(<Date 2>, 'MM/DD/YYYY') - Date#(<Date 1>, 'MM/DD/YYYY'))

MayilVahanan

Hi

Create a field from script itself, by subtracting two fields. And use tat. Hope that helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
ngulliver
Partner - Specialist III
Partner - Specialist III

HI, Vinod.

I have had to do something very similar and have used the 'floor' function in the calculation to round downwards to the next full amount (see QlikView help for 'floor' usage). This is particularly useful if you are dealing with hours in the day too.

floor(([Date1] - [Date2])) as [Days To Resolve],

Regards,

Neil

CELAMBARASAN
Partner - Champion
Partner - Champion

Use Interval(Date2-Date1, 'd')

It gives you the number of days between the date.

Not applicable
Author

Thanks

Not applicable
Author

Thanks

Not applicable
Author

Thanks