Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Convert 2 minutes 30 seconds to 150 seconds??

Is there a formula to convert minutes into seconds??

7 Replies
MayilVahanan

Hi

Try like this

=Minute(timeField)*60+second(timeField)

Hope it helps

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

=interval(Interval#('02:30','mm:ss'),'ss')

Anonymous
Not applicable
Author

Hi Mayil and swuehl,

Will these work if I'm trying to convert all minutes to seconds?

swuehl
MVP

What do you mean with 'all minutes'? I assume you have field with some values. What is the format of this field? Already a QV timestamp, with a numeric representation?

Peter_Cammaert
Partner - Champion III

What do you mean by "all minutes"?

Interval#/Interval work better than Minute*60 + Second because they will accept "excessive" values. Minute() and Second() will only return "allowed" values.

For example:

  • interval(Interval#('02:30','mm:ss'),'ss') works
  • interval(Interval#('99:00','mm:ss'),'ss') also works
  • interval(Interval#('33:70:00','hh:mm:ss'),'ss') also works

but interval(Interval#('33:70:00','mm:ss'),'ss') or interval(Interval#('70:00'),'ss') won't because the time value won't match the format that is explicitly/implicitly specified.

Does this answer your question?

Peter

sergeyay
Contributor III

May be like this?

=interval(Interval#(timeField, '[hh:]mm:ss'), 'ss')

//use square brackets for hours

Sergey

techvarun
Specialist II

This will work  

Hour(num(Date(DateFiled))*3600+Minute(num(Date(DateFiled)))*60+second(num(Date(DateFiled))))