Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
As i mention in the Subject, I want to calculate the date difference between two dates data, then store it into new field.
So my data basically like this
I want to calculate the difference between Closed Date and the Created Date in Day format, but it has decimal value.
So for example, the first data, the created date is 10/16/2018 9:00:53 AM and the Closed Date is 10/22/2018 11:11:40 AM, then for the result, if I count in the Excel using this function :
Closed Date - Created Date
I got the result = 6,09 Days.
I already tried this in the QlikSense :
Interval((date#(([Closed Date]),'MM/DD/YY hh:mm:ss')) - (date#([Created Date],'MM/DD/YY hh:mm:ss')),'d')
but the result is '-'.
Try like this:
=num((date#(([Closed Date]),'MM/DD/YY hh:mm:ss TT')) - (date#([Created Date],'MM/DD/YY hh:mm:ss TT')),'##.00')
Hi @Zaidan_as ,
Try this:
Interval((date#(([Closed Date]),'MM/DD/YY hh:mm:ss TT')) - (date#([Created Date],'MM/DD/YY hh:mm:ss TT')),'d')
Thanks for the answer,
Your expression working fine, but the result is integer. Can it change to the float, so the result is just like i write in the Post.
This is the result with your expression
I want the first data, from 6 to 6,09.
But if it's cannot change to integer to float, it's ok for me.
Try like this:
=num((date#(([Closed Date]),'MM/DD/YY hh:mm:ss TT')) - (date#([Created Date],'MM/DD/YY hh:mm:ss TT')),'##.00')
Wow. It working really fine. Thank you so much for your answer.