• Status: Solved
• Priority: Medium
• Security: Public
• Views: 383

# Excel formula calculate difference in two datetimes, answer in hours and tenths (decimal)

How can I create a new column that contains the difference between two datetime values, with the answer expressed in hours and tenths-of-hours?

Example:
Begin Date (in A1) = 6/9/2011  12:04:00 PM
End Date (in B1) = 7/1/2011  12:15:00 PM

Hours Spent = B1 - A1

The answer is 528:11 when I custom-format it with [hh]:mm , but I need it to show as 528.2 (decimal format).

0
notawahoo2
• 2
1 Solution

ConsultantCommented:
To display hours with a decimal or fractional part divide the value by 24 and format the result as a number as illustrated below.

=A1/24

Kevin
0

Commented:
I think you need to multiply by 24 Kevin, so for the above try this formula

=(B1-A1)*24

format result cell as number with 1 decimal place

If you need result to be exact 10ths (and not just displayed that way) use ROUND, too, i.e.

=ROUND((B1-A1)*24,1)

regards, barry
0

ConsultantCommented:
Dang. Thanks Mr. Barry.
0

Author Commented:
So Simple!

Thanks!!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.