12 Replies Latest reply: Apr 20, 2017 7:18 AM by Sunny Talwar

# Format seconds to [hh]:mm:ss

Hi guys please can someone tell me how to format a field in time so over 24 hours clocks up the hours if that make sense so hh:mm:ss 25:00:00 should not equal 01:00:00

this is currently the expression that I have tried

Interval(SUM(TalkTime)/86400, 'hh:mm:ss')

Thanks so much

Matt

• ###### Re: Format seconds to [hh]:mm:ss

Hi Wilson,

Can you a sample example with one or two dates , what are you looking for? It helps for understanding the issue

• ###### Re: Format seconds to [hh]:mm:ss

hello

so ?

Interval( 1/24/60/60*sum(sumsecond) ,'hh:mm:ss') as TIME

Interval(1/24/60/60 * SUM(TalkTime), 'hh:mm:ss') as yourvar

Gerry

• ###### Re: Format seconds to [hh]:mm:ss

I get an error with that and I am sure it would yield the same result

so what I am after is the expression so if I have an integer of 93,600 (seconds in 26 hours it should return) 26:00:00

• ###### Re: Format seconds to [hh]:mm:ss

send a example from your input

greetings Gerry

• ###### Re: Format seconds to [hh]:mm:ss

so what I am after is the expression so if I have an integer of 93,600 (seconds in 26 hours it should return) 26:00:00

• ###### Re: Format seconds to [hh]:mm:ss

Try with Interval() and Interval#() functions

=Interval(Interval#(93600, 'ss'), 'h:mm:ss')

• ###### Re: Format seconds to [hh]:mm:ss

Thank you however that just returns a dash/ hyphen –

I am using QlikSense 3.2

• ###### Re: Format seconds to [hh]:mm:ss

Do you have a comma in your seconds field? May be try this

=Interval(Interval#(KeepChar(93600, '0123456789'), 'ss'), 'h:mm:ss')

P.S. QlikView or Qlik Sense, it should work

• ###### Re: Format seconds to [hh]:mm:ss

probiere das

Interval(  1/24/60/60 * TalkTime,'hh:mm:ss') as yourVar

:-)

gruß Gerry

• ###### Re: Format seconds to [hh]:mm:ss

Thank you sir, I had already fixed the field name, though it still returns (if you go over 24) hours time as opposed to :mm:ss

• ###### Re: Format seconds to [hh]:mm:ss

Hello Matt

Excuse me for my bad english

danke Thanks greetings

Gerry

• ###### Re: Format seconds to [hh]:mm:ss

Thank you but is isnt