Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
LINKEDIN LIVE: Democratizing data to enhance customer-centricity. JULY 29TH REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
soha1902
Creator
Creator

Convert HH:MM:SS into seconds


Hi All,

I have one field named "Duration" which contains the time values in HH:MM:SS format (like 00:12:36). I want to convet these values in Seconds. Please suggest me.

Thanks.

1 Solution

Accepted Solutions
jonathandienst

Hi

Do you want to format it to display seconds (assuming Duration is a valid time value?

     =Interval(Duration, 'ss')

Or assuming it is a string?

     =Interval(Time#(Duration), 'HH:MM:SS'), 'ss')

Or do you want to convert it to seconds (assuming it is a valid time value)

     =Duration * 86400

Or convert it (assuming it is a string)

     =Time#(Duration, 'HH:MM:SS') * 86400

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

3 Replies
arulsettu
Master III
Master III

hi

try this

=Interval(Time#('00:12:36','hh:mm:ss'),'ss')

thimma_paul
Contributor III
Contributor III

For Seconds =Interval(Time#('00:12:36','hh:mm:ss'),'ss')

jonathandienst

Hi

Do you want to format it to display seconds (assuming Duration is a valid time value?

     =Interval(Duration, 'ss')

Or assuming it is a string?

     =Interval(Time#(Duration), 'HH:MM:SS'), 'ss')

Or do you want to convert it to seconds (assuming it is a valid time value)

     =Duration * 86400

Or convert it (assuming it is a string)

     =Time#(Duration, 'HH:MM:SS') * 86400

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post