Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good morning,
i would like to convert during script load some decimal numbers to time hh:mm:ss like below:
Original Duration Format | Formatted Duration |
---|---|
0.099537037037037 | 02:23:20 |
0.00037037037037037 | 00:00:32 |
if i insert the fields ( in origianal format) on a table ad set "duration" as format, qlik sense calculate correctly the conversion.
I Would like to obtain this result by using load script.
I've already tried:
- time([Reload Duration]) as [Reload Duration]
- date([Reload Duration],'hh:mm:ss') as [Reload Duration])
- Interval(interval#(ceil([Reload Duration]),'D'), 'hh:mm:ss') as [Reload Duration]
and other solution but no-one is working...
Try it with something like this:
time(num#('0.00037037037037037', '#,##0.###########', '.', ','))
or maybe
time(num#(left('0.00037037037037037', 15), '#,##0.###########', '.', ','))
- Marcus
Please, share sample data and load script.
I try this:
[table]:
LOAD Interval([Reload time],'hh:mm:ss') as [Reload time format],
*;
LOAD *,
Timestamp#(End,'DD/MM/YYYY hh:mm:ss') - Timestamp#(Start,'DD/MM/YYYY hh:mm:ss') as [Reload time];
LOAD * Inline [
Start, End
'12/08/2018 05:07:32', '12/08/2018 05:08:04'
];
I stored the table in qvd and loaded the table again from qvd, the time format remained..
Regards,