Calculating Date in Decimal Format

IndigoSim

New Member
Joined
Jul 2, 2004
Messages
2
Hi

What is a formula that subtracts two times and gives me the result in decimal format? Eg: Column A has time in a two decimal format ie 12pm is entered as 12.00, Column B has time the same format ie 4.30pm is entered as 4.30 and column C is column A minus Column B ie 12.00 - 4.30 = 4.5hrs. These columns represent a start time and a finish time and I want to calculate the amount of time spent in a decimal format ie: 1.2 hours etc so I can add up time spent on different projects.

Thanks alot
 

Some videos you may like

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

scifibum

Well-known Member
Joined
Jul 22, 2004
Messages
503
Here's a start. To convert one time in your format of "12.30" representing "12:30" to a decimal time format (i.e. 12.5):

=ROUNDDOWN(A1,0)+((A1-ROUNDDOWN(A1,0))/0.6)

if you have 12.30 in A1, you get 12.5 result. If you have 12.20, you get 12.333333333...

Hope this helps.
 

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,458
IndigoSim said:
Hi

What is a formula that subtracts two times and gives me the result in decimal format? Eg: Column A has time in a two decimal format ie 12pm is entered as 12.00, Column B has time the same format ie 4.30pm is entered as 4.30 and column C is column A minus Column B ie 12.00 - 4.30 = 4.5hrs. These columns represent a start time and a finish time and I want to calculate the amount of time spent in a decimal format ie: 1.2 hours etc so I can add up time spent on different projects.

Thanks alot

Why not just enter time that Excel recognizes. It's just a matter of entering a colon instead of a decimal. You'll be better off in the long run. If you want an answer in decimals, multiply by 24.
 

scifibum

Well-known Member
Joined
Jul 22, 2004
Messages
503
Good point from Brian. If you don't have control over how the data is entered you might be better off doing a Find/Replace on the existing data to replace "." with ":".
 

Watch MrExcel Video

Forum statistics

Threads
1,123,189
Messages
5,600,219
Members
414,373
Latest member
jp1392

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top