edguz

Q: Convert duration to number?  Help.

hello,
i am trying to convert a duration to a number. i have a cell that calculates total minutes from a start and stop time. then i am trying to multiply that number by another number and not have that result expressed as a duration.

cell1: ( x min)
cell 2: (number)
cell 3: (cell1*cell2) expressed as a number, not duration

thank you very much.

ed.

MacBook Pro, Mac OS X (10.6.3)

Posted on May 25, 2010 4:14 PM

Close

Q: Convert duration to number?  Help.

  • All replies
  • Helpful answers

  • by jaxjason,

    jaxjason jaxjason May 25, 2010 5:35 PM in response to edguz
    Level 4 (3,729 points)
    iWork
    May 25, 2010 5:35 PM in response to edguz
    Look in the function list under categories , there is a whole category dedicated to converting durations to hours, minutes, seconds, etc... Even to just strip duration from a number.

    Jason
  • by bartlettpsj,

    bartlettpsj bartlettpsj Feb 6, 2014 1:07 PM in response to edguz
    Level 1 (0 points)
    Feb 6, 2014 1:07 PM in response to edguz

    Use function STRIPDURATION.  i.e. =STRIPDURATION(B21)

     

    Paul

  • by ronniefromcalifornia,

    ronniefromcalifornia ronniefromcalifornia Feb 9, 2014 2:42 PM in response to edguz
    Level 2 (230 points)
    Feb 9, 2014 2:42 PM in response to edguz

    I think STRIPDURATION always assumes you want the resulting number in terms of "Days". It is the same as DUR2DAYS. In your example, you have minutes, so maybe you want the resulting number in terms of "Minutes"?

     

    For example:

     

    Cell1: 30 min

    Cell2: 2

    Cell3: =Cell1xCell2 is 60m

    =STRIPDURATION(Cell3) is .041666, which means 60 minutes is .04 of 1 day.

     

    If you are expecting the answer to be 60, then:

    =DUR2MINUTES(Cell3) is 60.

     

    If you didn't want to use either of these formulas, you could try formatting Cell3 as minutes with Style set to 0 so there are no units showing. I am not sure if that will cause you trouble further down the road with other calculations since 60 is really still a duration and not a number. With the formulas, the 60 is really a number.

  • by jobish03,

    jobish03 jobish03 Jan 18, 2016 2:57 PM in response to ronniefromcalifornia
    Level 1 (4 points)
    Jan 18, 2016 2:57 PM in response to ronniefromcalifornia

    thank you .. your answer is helped me