Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear team,
I have a table where I have arrival time in one column and left time in another field, i need to know the duration between those two times
I am using qlik sense
the outcome should be in hours but decimal example 2.5 is two hrs and 30 min
thank you in advance.
at least i got a result but it was worng, what i am missing here is what i was using:
=Interval(Timestamp#([Left Time],'hh:mm')-Timestamp#([Arrival Time],'hh:mm'),'hh:mm')
Hi,
You can try a Timestamp([Left Time] - [Arrival Time]) and use the format you want.
You can also chose to display as a duration in the measure parameters
Hope that helps.
Best regards
Thank you for your prompt reply, but it didn't work.
it is just time filed, could be not recognized as such in qlik?
example currently have them as 18:40 in an excel column
What if you try something like this :
round(([Left Time]-[Arrival Time])*1440,0.02)
Hi,
you will need to use Interval() function
Take a look here to understand how it works: https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/FormattingFunc...
example:
Interval(left_time-arrival_time,'hh:mm')
no also not working.
Thank you
but didn't work i'm using this:
=Interval([Left Time]-[Arrival Time],'hh:mm')
then you will need to evaluate your timestamp fields correctly using Timestamp#()
like this
=Interval(Timestamp#(left_time,'your format')-Timestamp#(arrival_time,'your_format'),'hh:mm')
PS: if the format of your time field is this: DD/MM/YYYY hh:mm:ss then just replace it in the greyed part above
at least i got a result but it was worng, what i am missing here is what i was using:
=Interval(Timestamp#([Left Time],'hh:mm')-Timestamp#([Arrival Time],'hh:mm'),'hh:mm')
hey i did it
this one works: so i was missing the timestamp
=(Timestamp#([Left Time],'hh:mm')-Timestamp#([Arrival Time],'hh:mm'))*1440