# Thread: Convert timeclock to number value.

1. ## Convert timeclock to number value.

Im trying to show downtimes at a plant. 09:00 - 12:00 - downtime of 3 hours. what formula do i use to do this? when i subtract the "hours" then the cell that contains the formula is in "hours" and doesn't covert to "number" correctly. Also, when the total hours goes over 24 its converting it into days, but i want total hours. Any help would be appreciated.  Reply With Quote

2. Using 24 hour time, if the beginning time is in A2 and the ending time is in B2 try this in C2

=ABS((\$B2) - (\$A2) - ((\$A2) > (\$B2))) * 24  Reply With Quote

3. Multiply by 24

=(B2-A2)*24

be sure to format it as General, or N it

=N((B2-A2)*24)  Reply With Quote

4. Carol

Correction to the formula I posted above, should be
=ABS((\$B2) - (\$A2) + ((\$A2) > (\$B2))) * 24

also, you say
when the total hours goes over 24 its converting it into days
how does it know it's over 24 hours? Is there something else that would indicate the date the times are for?  Reply With Quote

5. Originally Posted by Carol Also, when the total hours goes over 24 its converting it into days, but i want total hours. Any help would be appreciated.
Format as [h]:mm:ss  Reply With Quote

6. You may also want to try the convert formula

http://office.microsoft.com/en-us/ex...003056110.aspx  Reply With Quote

converting hours 