# Thread: Formula-Converting time to Number (2003)

1. ## Formula-Converting time to Number (2003)

I am creating a new timesheet for our work, I modified one of the Microsoft Templates to meet my needs, but it didn't have formulas in it. I have attached the spreadsheet so you'll be able to see what I'm talking about. Column G is the result of a formula that adds the time for each day using the date number format, so we can calculate from the IN and OUT times. Now I need to convert the number in Column G to a number or integer with one decimal point, so I can add it along with columns H through K and have them total as number of hours with one decimal place in Column L. Notice I am also doing totals at the bottom in Row 21 and all these totals need to be numbers rather than time. I just can't figure out what formula to use to convert the time in G to a number. Any ideas, your help will be most appreciated.

2. ## Re: Formula-Converting time to Number (2003)

Does the following in G7 do what you want?

<code>=ROUND(((D7-C7)+(F7-E7))*24,1)</code>

It takes the amount of time working in the morning, adds the amount of time worked in the afternoon and then multiplies it by 24 to convert it into hours. The round function is used to round the answer to 1 decimal place.

3. ## Re: Formula-Converting time to Number (2003)

Tony, you are the greatest and the best. It worked fantastic! I am indebted to you! I guess the key is the *24 to get the whole days time. Will remember that and not have to ask again. Again, where can I send your brownies?