Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

time format

hi,

i have two kind of time formats:

00:01:10 wich is hh:mm:ss and 01:10 wich is mm:ss.

i need to convert the second format to hh:mm:ss

how can i do this?

i've tried with timestamp# (date,'hh:mm:ss') and whit Date#(date,'hh:mm:ss) but it didn't do what i need.

time.jpg

thanks for your help!

1 Solution

Accepted Solutions
Jason_Michaelides
Luminary Alumni
Luminary Alumni

try:

Time(Time#(Duration,'mm:ss'),'hh:mm:ss')

Hope this helps,

Jason

View solution in original post

3 Replies
swuehl
MVP
MVP

Try using the alt() function in combination with interval# / interval functions:

LOAD

...

interval(alt(interval#(Duration,'hh:mm:ss'),interval#(Duration,'mm:ss')),'hh:mm:ss') as NewField,

...

FROM ...

Jason_Michaelides
Luminary Alumni
Luminary Alumni

try:

Time(Time#(Duration,'mm:ss'),'hh:mm:ss')

Hope this helps,

Jason

Not applicable
Author

thanks for your answer it really helped me.