Computing.Net > Forums > Office Software > Convert Time To Decimal In Excel

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Convert Time To Decimal In Excel

Reply to Message Icon

Name: gdmorgan
Date: April 17, 2003 at 21:30:47 Pacific
OS: WinXP
CPU/Ram: PII 400
Comment:

Hello,
I have set up a simple timecard in Excel. There is a time field for clocking in, and another for clocking out. I want Excel to then calculate the number of hours worked. I have looked in the help files but still can't figure it out. Any advice is greatly appreciated! Thanks!



Sponsored Link
Ads by Google

Response Number 1
Name: Krystyna
Date: April 18, 2003 at 06:18:56 Pacific
Reply:

I just tried it using B1-A1, and it worked okay.
A1 and B1 are formatted as TIME

A1 = 08:00
B1 = 16:30

Formula in C1 =B1-A1

Answer in C1 was 8:30 ( 8 hours and 30 mins )

Krystyna


0

Response Number 2
Name: Krystyna
Date: April 18, 2003 at 06:42:49 Pacific
Reply:

Ooops...forgot the rest !

To then convert the answer in c1 to a decimal amount
The formula in D1 is =C1*24
The answer will be 8.5 ( 8 and a half hours )

or the formula in C1 could be (B1-A1)*24

Krystyna


0

Response Number 3
Name: gdmorgan
Date: April 18, 2003 at 09:45:26 Pacific
Reply:

This is great advice, however there is one problem... For this to work time in and time out must be set in military time. Is there a way to have a clock in at 9:30 AM and a clock out at 5:00 PM, and still be able to calculate the number of hours worked? Whenever I try this I get an error. Any help is greatly appreciated. Thanks!!!


0

Response Number 4
Name: Krystyna
Date: April 19, 2003 at 07:17:22 Pacific
Reply:

I got the equations to work okay, using AM/PM time format.

Provided that you format the starting time and finish time as TIME 1:30 PM
and type the time in exactly as 9:30 AM and 5:00 PM, it will compute the hours in decimals.
It won't work if you type am or pm...has to be capitals AM and PM

A1 = 9:30 AM
B1 = 5:00 PM

C1 = 7:30
Formula is =B1-A1
Format is TIME 13:30

D1 = 7.50
Formula is C1*24
Format is NUMBER to 2 decimal places

Krystyna


0

Response Number 5
Name: SN
Date: April 19, 2003 at 15:01:31 Pacific
Reply:

Krystyna is right...Changing the format of a cell (ie from military to "standard" time) only changes how it displays. Excel is one of the smartest programs out there, IMHO, and has a universal method of internally computing times, dates, currency, etc. so it doesn't matter which format it is displayed in, as long as it is a time, excel will perform the subtraction appropriately.

-SN


0

Related Posts

See More



Response Number 6
Name: elric
Date: April 20, 2003 at 06:12:27 Pacific
Reply:

G'day,

Yes, the above is correct, but if you want the equations etc look in your excel directory for a file called examples.xls.
This has an example of exactly what you are trying to achieve.
regards,
Elric


0

Sponsored Link
Ads by Google
Reply to Message Icon

Field Range in Access Excel, in a new window..



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: Convert Time To Decimal In Excel

Excel (decimals and time) www.computing.net/answers/office/excel-decimals-and-time-/8432.html

Converting negative time in Excel www.computing.net/answers/office/converting-negative-time-in-excel/8288.html

Turning Time into Text in Excel!!! www.computing.net/answers/office/turning-time-into-text-in-excel-/4074.html