Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ;
I have two field that l want to subtract. [Last Drop Arrival Date] minus [First Pick Departure Date].
First Pick Departure Date | Last Drop Arrival Date | TravelTime |
18/01/2016 12:47 | 18/01/2016 13:40 | |
18/01/2016 18:52 | 18/01/2016 19:52 | |
19/01/2016 00:50 | 19/01/2016 01:44 | |
20/01/2016 03:20 | 20/01/2016 04:38 |
I am not getting any results when l subtract the 2 fields.
Please assist.
May be you need to help QlikView Understand you TimeStamp Fields using TimeStamp#() function
LOAD *,
[Last Drop Arrival Date] - [First Pick Departure Date] as TravelTime;
LOAD
TimeStamp#([First Pick Departure Date], 'DD/MM/YYYY hh:mm') as [First Pick Departure Date],
TimeStamp#([Last Drop Arrival Date], 'DD/MM/YYYY hh:mm') as [Last Drop Arrival Date]
FROM Source;
SET TimestampFormat = 'DD/MM/YYYY hh:mm';
LOAD
[First Pick Departure Date],
[Last Drop Arrival Date],
Interval( [Last Drop Arrival Date]-[First Pick Departure Date]) as TravelTime,
,,
Use the INTERVAL() function to calculate the difference between two time or date values.