Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can I convert hh:mm:ss into minutes or seconds

Hi ,

Can any one please let me know how to convert the value hh:mm:ss into minutes or seconds

7 Replies
Not applicable
Author

I am not exactly sure about your question, but checkout Interval function,which is used something like

For e.g. the expression =Interval( today()-(today()-2), 'hh:mm:ss')

will output 48 hours.


P.S:  In case this is not what you are looking out for, please update some more details.

PrashantSangle

Hi,

Use

Hour(),Minute() and Second()

For details see in help menu.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
amit_saini
Master III
Master III

Divya,

Try this:

=Interval(Date#('04-08-2012 05:11:11', 'DD-MM-YYYY hh:mm:ss') - Date#('04-08-2012 05:12:15', 'DD-MM-YYYY hh:mm:ss'), 'mm:ss' )


Thanks,

AS

MayilVahanan

HI

Hope this link helps to understand for conversion

= hour(now()) * 60 + minute(now())  give result in minutes


Re: hh : mm : ss format converted to hour (numeric) value

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Hi All,

Thanks for your replies.

I tried this and it worked out for my requirement.

(Subfield([time_value],'hh:mm:ss'),':',1)*60*60)+

(Subfield([time_value],'hh:mm:ss'),':',2)*60)+

(Subfield([time_value],'hh:mm:ss'),':',3))

MarcoWedel

[time_value]×86400

MarcoWedel

Or

Frac([time_value])×86400

If it's a timestamp