convert h:mm:ss to seconds only

allanon1

New Member
Joined
Jan 6, 2010
Messages
20
how to convert hours:minutes:seconds to just seconds. for example in cell a1 I have 1:02:00 would come out 3720. any formula to do so would be great thanks:)
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Multiply by 86400 (24x60x60) and display as a number.
Excel Workbook
AB
101:02:003,720.00
Sheet1
Excel 2000
Cell Formulas
RangeFormula
B1=A1*24*60*60
 
Upvote 0
Depending on how precise you want the numbers, you may want to round the calculation to zero decimal places

=ROUND(A2*86400,0)

Excel does very precise calculations, but multiplying a time value by 86400 can (for some values) result in a decimal being calculated rather than a whole number of seconds.

For example, 02:10:25 when multiplied by 86400 returns 7824.99999999995. If you were to compare the calculation to a value of 7825 (the actual number of whole seconds in 02:10:25), the two would not match. Rounding the calculation to zero decimal places resolves the issue.
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,700
Members
448,979
Latest member
DET4492

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top