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:)
 

Some videos you may like

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

kgkev

Well-known Member
Joined
Jun 24, 2008
Messages
1,245
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
 

JugglerJAF

Active Member
Joined
Feb 17, 2002
Messages
269
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.
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,672
Messages
5,512,798
Members
408,914
Latest member
ariannem

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...
Top