Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mikegrattan
Creator III
Creator III

Timestamp interval problem

I'm trying to use the Interval function to get the difference in minutes between two timestamps, but the result is in error.  Here's the function I'm using in my load script:

Interval(TimeStamp#(TimeStamp(EndLoadTimestamp, 'M/D/YYYY h:mm:ss'), 'M/D/YYYY h:mm:ss') - TimeStamp#(TimeStamp(BeginLoadTimestamp, 'M/D/YYYY h:mm:ss'), 'M/D/YYYY h:mm:ss'), 'm') as MinutesToLoad

Here's what the results look like:

    

Month(Date)OrderTypeSalesOrderBeginLoadTimestampEndLoadTimestampMinutesToLoad
MaySO211694435/30/2018 8:55:375/30/2018 8:58:120.00
MaySO211694145/30/2018 7:33:365/30/2018 7:33:370.00
MaySO211693445/30/2018 2:18:395/30/2018 2:19:260.00
MaySO211693425/29/2018 18:11:435/29/2018 18:11:560.00
MaySO211691915/29/2018 12:07:495/29/2018 12:08:140.00
MaySO211691755/29/2018 18:42:195/29/2018 18:42:190.00
MaySO211691395/29/2018 16:08:045/29/2018 16:58:590.04
MaySO211691235/29/2018 18:34:415/29/2018 21:38:010.13

Any ideas on how to get this work correctly?

Thanks.

14 Replies
richardm90
Partner - Contributor III
Partner - Contributor III

test1.png

Thanks again

sunny_talwar

I can barely see the screenshot, let alone the expression you have used....

richardm90
Partner - Contributor III
Partner - Contributor III

Apologies....

test1.png

sunny_talwar

Might be because of rounding issues... try this

If(Expression > MakeTime(0, 29, 59) and Expression < MakeTime(0, 30, 1), 'Basic')

richardm90
Partner - Contributor III
Partner - Contributor III

Perfect! Thank you very much