Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
BenGielen
Contributor III
Contributor III

converting time format

Hello together,

i have an question to convert a duration/time format.

my data is for example: 6,35 (these are hours) (6,35h availability)

i need to convert this 6,35 to 'hh:mm:ss' like this -> 06:35:00.

how can i do this in the loading script. 

thank you very much for your support. 

 

Ben

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

A small tweak would be to use interval#()

interval(
interval#(subfield(Field, ',', 1), 'h') +  interval#(subfield(Field, ',', 2), 'm')
,'hh:mm:ss')

-Rob

View solution in original post

2 Replies
Taoufiq_Zarra

@BenGielen 

May be this :

=interval((subfield(Field,'.',1)*3600+subfield(Field,'.',2)*60)/86400, 'hh:mm:ss') 

output for 6.35

Taoufiq_ZARRA_0-1591626734162.png

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

A small tweak would be to use interval#()

interval(
interval#(subfield(Field, ',', 1), 'h') +  interval#(subfield(Field, ',', 2), 'm')
,'hh:mm:ss')

-Rob