Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I need to add two time values together, but they are in different formats. The first is in h:mm:ss format, and the second is a decimal:
Working Hours | Overtime |
---|---|
1:00:00 | 1.08 |
2:23:00 | 2.20 |
In other words, I need to add 1:00:00 (1 hour) to 1.08 hours. My desired output is 2:04:80.
I have tried changing the format to duration and the pattern to h:mm:ss, but Qlik is recognizing the 1.08 as 1.08 days (25:55:12), not 1.08 hours.
I appreciate the help. Let me know if you need more information.
Aaron
Try something like
SET TimeFormat = 'h:mm:ss';
LOAD *,
Interval(Rangesum( [Working Hours], OvertimeQV) ) as SummedTimes;
LOAD [Working Hours],
Overtime,
Overtime / 24 as OvertimeQV
FROM ...;
Try something like
SET TimeFormat = 'h:mm:ss';
LOAD *,
Interval(Rangesum( [Working Hours], OvertimeQV) ) as SummedTimes;
LOAD [Working Hours],
Overtime,
Overtime / 24 as OvertimeQV
FROM ...;