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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
praveenkumar_s
Creator II
Creator II

Need to find difference in minutes using two timestamp fields

Hi friends,

I just need to find the difference between two timestamp columns by minutes and also i have to remove seconds . Any suggestion would be really helpful.

eg: jan 12,2017 11:27:28 PM and jan 12,2017 11:37:22 PM

Actual answer using interval function including seconds: 9 minutes

Expected answer : 10 minutes (remove seconds and have to find difference)

23 Replies
maximiliano_vel
Partner - Creator III
Partner - Creator III

Just use (TimeStamp2-TimeStamp1)*1440 the result will be in minutes then you can Round Up or Down depending on what you want.

sunny_talwar

Check attached using Peter's technique

Capture.PNG

sunny_talwar

Here is another approach

=Interval(TimeStamp#(TimeStamp(ORIG_RESTORE_TS, 'M/D/YYYY h:mm'), 'M/D/YYYY h:mm') - TimeStamp#(TimeStamp(NEW_RESTORE_TS, 'M/D/YYYY h:mm'), 'M/D/YYYY h:mm'), 'm')

praveenkumar_s
Creator II
Creator II
Author

Sunny and peter,

kudos for your continuous effort. finally i achieve that using the above expression. Thank you. please stay in touch.