# Calculating Date in Decimal Format

#### IndigoSim

##### New Member
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

### Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},\$Z\$1:\$Z\$99,\$Y\$1:\$Y\$99),2,False) to lookup Y values to left of Z values.

#### scifibum

##### Well-known Member
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
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
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 ":".

Replies
2
Views
378
Replies
3
Views
105
Replies
9
Views
356
Replies
0
Views
142
Replies
1
Views
671

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,163,852
Messages
5,833,979
Members
430,249
Latest member
Muka

### 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.

### Which adblocker are you using?

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

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