Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change a timespan into decimal format in excel?

Tags:

excel

I have the following problem. In my excel sheet, I subtracted two time values to get its timespan. Here is an example:

16:30-8:00=8:30

the cell format is a time so its all fine. Now the problem: I need to show the timespan also as a decimal. So the 8:30 should be a 8,50 Anybody know how to do this?

like image 701
gurehbgui Avatar asked Feb 14 '23 13:02

gurehbgui


2 Answers

Use =24*(B2-C2), where the cell where calculation happens should be formatted in 2 decimal number format .

B2= start time.

C2= End time.

like image 119
PKumar Avatar answered Feb 23 '23 07:02

PKumar


Try this

Say A3 is 08:30, you can put this in A4

=HOUR(A3) & TEXT(MINUTE(A3)/60, ".00")

like image 29
sam092 Avatar answered Feb 23 '23 06:02

sam092