Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have durations in INTEGER format in a database.
It's integers represent running time in milliseconds.
for example: 1983000 = 00D 00H 33M 03S 00MS because: 1983000/60000 = 33.05 ==> 33min + ((05*60)/100) = 3s
How can I get this time value from the integer in QlikSense?
I tried several functions like time, timestamp or interval, but nothing seems to correspond to what I want to do.
use Interval(). The important part is the format parameter.
You may consider first transforming your number into seconds by dividing 100.
Edit: you have to match the correct qlik number by calculating SECOND_Field /86400 as Qlik_SECONDS //(=24h*60m*60s)
Hello,
Convert this integer to time and change it to the good format. Try this expression :
TIME(TIME#([Time_field]/1000, 'ss'),'hh:mm:ss')
// The division by 1000 transform milliseconds into seconds.
Best regards.
Hi,
another solution might be:
table1:
Load *,
Interval(duration/86400000,'d hh:mm:ss.fff') as durationInterval
Inline [
duration
1
10
100
1000
10000
86400
100000
1000000
1983000
1983123
10000000
86399999
86400000
86400001
100000000
171943210
];
hope this helps
Marco