ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How can I convery time? (https://www.excelbanter.com/excel-worksheet-functions/120401-how-can-i-convery-time.html)

Keith

How can I convery time?
 
I have a column full of time in the format hh:mm:ss so and entry could be
00:23:03 for 23 minutes and 3 seconds.

How can I get the total number of seconds for an entry?

Sloth

How can I convery time?
 
If you simply want to display the total number of seconds use a custom number
format of...
[s]

If you want a formula to show the number of seconds use this formula
=A1*24*60*60
You will have to change the format to a number (otherwise it will think the
result is a date).

"Keith" wrote:

I have a column full of time in the format hh:mm:ss so and entry could be
00:23:03 for 23 minutes and 3 seconds.

How can I get the total number of seconds for an entry?


Keith

How can I convery time?
 
Sloth,

That was great. After I posted the question I tried to work out a formula.
I got one that worked but is was:

=CONVERT(HOUR(A2),"hr","sec")+CONVERT(MINUTE(A2)," mn","sec")+SECOND(A2)

As you can guess I much prefer your suggestion.

Thanks for your help

Keith

"Sloth" wrote:

If you simply want to display the total number of seconds use a custom number
format of...
[s]

If you want a formula to show the number of seconds use this formula
=A1*24*60*60
You will have to change the format to a number (otherwise it will think the
result is a date).

"Keith" wrote:

I have a column full of time in the format hh:mm:ss so and entry could be
00:23:03 for 23 minutes and 3 seconds.

How can I get the total number of seconds for an entry?



All times are GMT +1. The time now is 02:24 AM.

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