Previous in Forum: Low Level Format with Block Size of 256 Bytes   Next in Forum: Torque Calculation and Display
Close
Close
Close
4 comments
Rate Comments: Nested
Associate

Join Date: May 2010
Location: NC
Posts: 48

Excel Time Conversion

04/11/2011 3:43 PM

In excel I have some time data in the format hh:mm:ss when you click on the cell it reads it as time i.e 12:00:06 AM for 0:00:06. It should read 6 seconds. Does anyone know what I can do convert 0:00:06 to min? i.e. the cell would read 0.1?

Thank you,


Tom

Register to Reply
User-tagged by 1 user
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

Good Answers:

These comments received enough positive votes to make them "good answers".
4
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#1

Re: Excel Time Conversion

04/11/2011 8:38 PM

If the time is stored as a number, 0 to 24 hours will be represented by a number in the range 0 to 1.

Hope this example makes sense to you:

(N.B. this is on a PC - may be different on a Mac).

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply Good Answer (Score 4)
Associate

Join Date: May 2010
Location: NC
Posts: 48
#3
In reply to #1

Re: Excel Time Conversion

04/12/2011 7:10 AM

Thank you very much.

Register to Reply Off Topic (Score 5)
2
Guru

Join Date: Aug 2005
Location: Hemel Hempstead, UK
Posts: 5826
Good Answers: 322
#2

Re: Excel Time Conversion

04/12/2011 5:31 AM

Here's another approach:-

__________________
If you spend all your time looking for people and things to complain about: trust me, you will find plenty to complain about.
Register to Reply Good Answer (Score 2)
4
Guru
Panama - Member - New Member Hobbies - CNC - New Member Engineering Fields - Marine Engineering - New Member Engineering Fields - Retired Engineers / Mentors - New Member

Join Date: Dec 2006
Location: Panama
Posts: 4273
Good Answers: 213
#4

Re: Excel Time Conversion

04/12/2011 3:46 PM

Excel stores the time/date data as a digital number, "date.time" where the whole part of the number represents the number of days since, I believe, January 1, 1900, while the fractional part of the number represents the time as a fractional part of a 24 hour period. First thing to do is to insure the data stored in the cells containing the time data do not also include date information: change the format of the cell to "number" (format menu, cells, number). If your results are consistently less than 1, then multiply this number by 24, which gives you the hours since midnight (0:0:0) as a decimal number. If all of your time values are less than 1 hour and you want the value as minutes instead of hours, multiply by 1440. For seconds, multiply by 86400. You do not have to reformat the cells containing the time data for this to work. The only reason we change the format of the cell to number is to verify that the value does not include embedded date numbers. Examples:

T

No need to convert the time entry, other than to insure it does not include embedded date information as well. If the time entry has the date embedded, one must operate only on the fractional part of the number. If the time data is stored with date information, you can strip the date from the number by using the formula:

=(A3-INT(A2))*c

Where c is 24, 1440 or 86400, depending on whether you want hours, minutes or seconds.

Disclaimer: This works in Excel 2000 and OpenOffice/LibreOffice Calc. No telling what MS has done to pervert the operation in newer versions of Excel.

Register to Reply Good Answer (Score 4)
Register to Reply 4 comments

Good Answers:

These comments received enough positive votes to make them "good answers".
Copy to Clipboard

Users who posted comments:

cwarner7_11 (1); JohnDG (1); Randall (1); simektp (1)

Previous in Forum: Low Level Format with Block Size of 256 Bytes   Next in Forum: Torque Calculation and Display
You might be interested in: Cell Processors, Battery and Fuel Cell Components

Advertisement