ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I convert time listed in hours(e.g. 170:41:19) to seconds? (https://www.excelbanter.com/excel-worksheet-functions/106928-how-do-i-convert-time-listed-hours-e-g-170-41-19-seconds.html)

Red Data Man

How do I convert time listed in hours(e.g. 170:41:19) to seconds?
 
I have a data cell that lists the sum of times, but it displays in a format
with colons in it. I want to convert that data to a SINGLE NUMBER. For
example, I would like to convert 170:41:19 to 614479 (the number of seconds
in 170 hours, 41 minutes and 19 seconds). I have more than 7000 of these
cells so I cannot do it manually. Any suggestions?

Dave F

How do I convert time listed in hours(e.g. 170:41:19) to seconds?
 
I multiplied the time by 24 and then multiplied that by 3600.

Example: if 170:41:19 is in A1, then in B1: =(A1*24)*3600 = 614479. Make
sure B1 is formatted as numbers, not time.
--
Brevity is the soul of wit.


"Red Data Man" wrote:

I have a data cell that lists the sum of times, but it displays in a format
with colons in it. I want to convert that data to a SINGLE NUMBER. For
example, I would like to convert 170:41:19 to 614479 (the number of seconds
in 170 hours, 41 minutes and 19 seconds). I have more than 7000 of these
cells so I cannot do it manually. Any suggestions?


Marcelo

How do I convert time listed in hours(e.g. 170:41:19) to seconds?
 
hi,

=((day(a1)*24+hour(a1))*3600)+(minute(a1)*60)+seco nd(a1)

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Red Data Man" escreveu:

I have a data cell that lists the sum of times, but it displays in a format
with colons in it. I want to convert that data to a SINGLE NUMBER. For
example, I would like to convert 170:41:19 to 614479 (the number of seconds
in 170 hours, 41 minutes and 19 seconds). I have more than 7000 of these
cells so I cannot do it manually. Any suggestions?



All times are GMT +1. The time now is 03:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com