Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I have question about Qlik Sense and conversion number (probably int) to time.
Our system ERP shows time as number (for example 742, 1840, 2130 where it is 7:42, 18:40, 21:30).
Unfortunately there is no dependence here because time 00:00 shows as 0 and 00:25 shows as 25.
I would like to write it more readable for report users in the form of time not number.
Can qlik allow such atypical conversions? Is there anyone who will help to the new user ?
BR,
Patryk
Maybe something like this :
time(time#(text(num(742, '0000')),'hhmm'),'hh:mm')
Seem to also work for the other exmples you gave
time(time#(text(num(1840 , '0000')),'hhmm'),'hh:mm')
time(time#(text(num(2130, '0000')),'hhmm'),'hh:mm')
time(time#(text(num(0, '0000')),'hhmm'),'hh:mm')
time(time#(text(num(25, '0000')),'hhmm'),'hh:mm')
Maybe something like this :
time(time#(text(num(742, '0000')),'hhmm'),'hh:mm')
Seem to also work for the other exmples you gave
time(time#(text(num(1840 , '0000')),'hhmm'),'hh:mm')
time(time#(text(num(2130, '0000')),'hhmm'),'hh:mm')
time(time#(text(num(0, '0000')),'hhmm'),'hh:mm')
time(time#(text(num(25, '0000')),'hhmm'),'hh:mm')
Dear Bill,
It works as I wanted !
I adjusted your code to a specific field : time(time#(text(num("my_field", '0000')),'hhmm'),'hh:mm')
Thanks for help !
BR,
Patryk
No worries, glad you are sorted and on the road.
Hi Bill,
The above you mentioned Script is working in Text object for me. but it is not working in the load script. I would like to know if I missed anything or it is not possible in the Load script
Thanks