Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Can someone help me with the below please?
I have three fields within my data - Vehicle - start time and end time.
the start and end time are in time stamp - e.g. 23:52:25.
What i want to do is sum how many hours a vehicle has been driven.
example data -
Vehicle | Start Time | End Time |
---|---|---|
Vehicle 1 | 00:02:38 | 23:25:25 |
Vehicle 2 | 01:04:00 | 20:00:00 |
Vehicle 3 | 06:00:00 | 12:00:05 |
I'm using QlikSense.
Thanks in advance !
Hi,
you can use Interval() function
make sure to evaluate and format your timestamps correctly
it should be something like this:
Interval([End Time]-[Star Time],'hh')
or if your fields are not yet correctly evaluated and formatted on the script:
Interval(Timestamp#([End Time],'hh:mm:ss')-Timestamp#([Star Time],'hh:mm:ss'),'hh')
Hi,
Try Interval function to get the time difference.
Like
Load * ,Interval (EndTime-StartTime) as DriveTime
From xyz;
Regards,
Kaushik Solanki