How do I convert a duration value (hours and minutes) to a decimal for use with in a formula?

I basically want to calculate time worked multiplied by an hourly pay rate. Was hoping I could do it in one formula. Simple formula = 100*B11. Where B11 is 9hr 0min and 100 is $100 dollars. Answer should be $900, however the returned answer is 900h. It won't allow me to reformat the cell to currency. Is there a way to convert TIME::B11 to a decimal? Thanks!

Posted on Sep 16, 2013 12:30 PM

Reply
Question marked as Top-ranking reply

Posted on Sep 16, 2013 12:45 PM

Pro,


All you need to do is add the function DUR2HOURS to your formula, to convert from duration to a numeric value of time.


=100 * DUR2HOURS(B11)


should do it for you.


Jerry

7 replies

Sep 21, 2014 3:37 AM in response to SGIII

Thanks, that is the problem: I originally entered as Date/Time then found out I meant Duration - I have gone in and changed the Column Type [under B] to Duration [it says Multiple] and entries down the column below all show DateTime...I have changed each one to Duration and they revert back to DateTime See the images = I suppose I could go in and reenter all in a new table but before I do that I'd like to figure out why I can't change the Format/Cell from DateTime to Duration and have it apply to all the items. They are formatted correctly for Duration but Numbers is not letting me do a global repair..


User uploaded file

User uploaded file

User uploaded file

Sep 20, 2014 8:46 AM in response to progress2013

I need help figuring this out for myself == I have tried the DUR formula but all it does is tell me it can't do it


part of the problem is that I have the time entered as Time = but I did try to change it to Duration and it keeps reverting back to Time - or Multiple = I have tried to set Duration in the column head [E] and in each separate column - saved the spreadsheet and it still reverts back to DateTime or Multiple.


What I have is 00:30:42 for instance as time/duration for a day. I need to multiply it by $250 to come up with total amount due for that time that day.


I can't seem to get the cells to recognize the item as Duration and not time [I made the mistake and entered data as Time - but one would think saving as Duration would suffice]

Sep 20, 2014 6:41 PM in response to Victoria Herring



What I have is 00:30:42 for instance as time/duration for a day. I need to multiply it by $250 to come up with total amount due for that time that day.


I can't seem to get the cells to recognize the item as Duration and not time [I made the mistake and entered data as Time - but one would think saving as Duration would suffice]


Enter it as 30m 42s and Numbers will recognize it as a duration. If you want, you can then change the format to 00:30:42 in the Format > Cell pane.


SG

Sep 21, 2014 4:57 AM in response to Victoria Herring

When you enter that hour—minute—second information into a Date/Time cell it converts it to a Date/Time value with today's date. That doesn't have any meaning as a Duration, and the cell doesn't remember what you entered, just the result.


You can use the TIMEVALUE() function to extract the number you need; if the Date/Time value is in cell B2, 24*TIMEVALUE(B2) will be the value that you entered in decimal hours.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How do I convert a duration value (hours and minutes) to a decimal for use with in a formula?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.