ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Convert decimal hour into time format? (https://www.excelbanter.com/excel-discussion-misc-queries/31511-convert-decimal-hour-into-time-format.html)

ramdalen

Convert decimal hour into time format?
 
I use Excel to evaluate the results from different competitions. For exemple
I use an start hour (2005-06-12 09.10.00) and the finish time (2005-06-17
17.39.14) from an offshore sailing race to get the hours sailed. Then I can
convert the hours (128.29.14) to decimal hour by using the =HOUR() etc to
extract the hour, minuts etc. With the decimal hour I can calculate the speed
in km/h or in this case knots.

But my question is how I can go the other way to convert decimal hour (1,5)
to time format (01.30.00)?

Peo Sjoblom

If you have 1.5 hours than divide it by 24 to get excel time (format as time
as well or else you'll still get it displayed as decimals albeit different)

Regards,

Peo Sjoblom

"ramdalen" wrote:

I use Excel to evaluate the results from different competitions. For exemple
I use an start hour (2005-06-12 09.10.00) and the finish time (2005-06-17
17.39.14) from an offshore sailing race to get the hours sailed. Then I can
convert the hours (128.29.14) to decimal hour by using the =HOUR() etc to
extract the hour, minuts etc. With the decimal hour I can calculate the speed
in km/h or in this case knots.

But my question is how I can go the other way to convert decimal hour (1,5)
to time format (01.30.00)?


Ron Rosenfeld

On Mon, 20 Jun 2005 07:38:04 -0700, "ramdalen"
wrote:

I use Excel to evaluate the results from different competitions. For exemple
I use an start hour (2005-06-12 09.10.00) and the finish time (2005-06-17
17.39.14) from an offshore sailing race to get the hours sailed. Then I can
convert the hours (128.29.14) to decimal hour by using the =HOUR() etc to
extract the hour, minuts etc. With the decimal hour I can calculate the speed
in km/h or in this case knots.

But my question is how I can go the other way to convert decimal hour (1,5)
to time format (01.30.00)?


Methinks you are making things more complicated than necessary.

I am assuming that in your locale, the '.' is the time separator, equivalent to
":" in the US.

Excel stores time as fractions of a day.

So to obtain the average speed:

=Distance/((EndTime-StartTime)*24)

and format as General, or Number with the requisite number of decimal places.

To convert decimal hour to time:

=DecHr/24

and format as time, or as [h]:mm:ss.000 if you don't want the result expressed
in days.


--ron


All times are GMT +1. The time now is 09:33 PM.

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