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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date/time Difference

Hi,

I need to find the difference between 2 date/time fields (e.g 01/02/2012 00:00:00) to show the difference in minutes.

So for example: schedule start time: 01/01/2012 11:00:00

                         Actual start time: 01/01/2012 11:15:00

I want it to show 15mins. I need it to work for negative numbers too, so:

schedule start time: 01/01/2012 11:00:00 

Actual start time: 01/01/2012 10:45:00

so it needs to show -15.

Please help.

Thanks in advance

Labels (1)
11 Replies
Not applicable
Author

Facing Same problem.  How to get rid of it?
vishnus85
Partner - Creator
Partner - Creator

Interval(Date(Date#(StopDateTime,'DD-MM-YYYY hh:mm'),'mm') - Date(Date#(StartDateTime,'DD-MM-YYYY hh:mm'),'mm') ,'mm')   worked for me.

I was not getting it correct when the (seconds) 'DD-MM-YYYY hh:mm:ss' portion was included.

removing the :ss part, giving only   'DD-MM-YYYY hh:mm' resulted in correct answer for me.