Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How to convert date/time to seconds

I would appreciate any help from an Excel guru out there that can help
me automatically convert a cell with a day:hours:minutes:seconds format
to seconds. So for example, 0:00:04:44 should be converted to 284.

Any ideas? Thanks in advance.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,089
Default How to convert date/time to seconds

You don't actually express time as days, hours, minutes and seconds the way
you have shown it. It is only hours, minutes and second

Assuming the time is in cell A1 *and* has zero days which can be ignored:

=RIGHT(A1,LEN(A1)-FIND(":",A1))*24*60*60 format as General

If you do have data in the format shown with days as the first element, you
could use:

=LEFT(A1,FIND(":",A1)-1)*24*60*60+RIGHT(A1,LEN(A1)-FIND(":",A1))*24*60*60

or

=(LEFT(A1,FIND(":",A1)-1)+RIGHT(A1,LEN(A1)-FIND(":",A1)))*24*60*60

Regards

Trevor


wrote in message
ups.com...
I would appreciate any help from an Excel guru out there that can help
me automatically convert a cell with a day:hours:minutes:seconds format
to seconds. So for example, 0:00:04:44 should be converted to 284.

Any ideas? Thanks in advance.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default How to convert date/time to seconds

Times are stored internally by Excel as fractions of a 24-hour day, so
that 12:00:00 would be stored as 0.5 and 18:00:00 as 0.75.
Consequently, to convert a time to seconds, you must multiply by the
number of seconds in a day - it is easier to remember this as *24*60*60
rather than the actual number (86400).

Hope this helps.

Pete

wrote:
I would appreciate any help from an Excel guru out there that can help
me automatically convert a cell with a day:hours:minutes:seconds format
to seconds. So for example, 0:00:04:44 should be converted to 284.

Any ideas? Thanks in advance.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the formula to convert time (3:46) to total seconds? LaurieC. Excel Worksheet Functions 1 April 25th 06 07:19 AM
Create a custom format to convert seconds to minutes. XOXO Excel Discussion (Misc queries) 3 April 12th 05 11:34 PM
How do I convert 00:03:54 to get 234 seconds? SteverinoNeedsHelp Excel Worksheet Functions 2 March 26th 05 07:17 PM
How do i convert a number of seconds to a date/time? Margo Excel Worksheet Functions 2 January 5th 05 12:09 AM
convert seconds to minutes and seconds Brian Excel Worksheet Functions 2 December 9th 04 09:45 PM


All times are GMT +1. The time now is 06:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"