Results 1 to 9 of 9

Math Help - Convert Decimal hours

  1. #1
    Newbie
    Joined
    Jun 2006
    Posts
    6

    Convert Decimal hours (on computer)

    K, I can do it on paper but how do I get a peice of software like excel
    to convert 1.3 hours to 1hr 18min or 01:18?

    Any help?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Member
    Joined
    Nov 2005
    From
    Wethersfield, CT
    Posts
    92
    Hi:

    Given input hours=h,


    h hrs = floor(h) hrs, 60*(h-floor(h)) min.


    Ex.: input: h=1.3
    flr(h)=flr(1.3)=1
    60*(h-floor(h)) = 60*(1.3 - 1) = 60*0.3 = 18.


    Output: 1.3 hrs = 1hr, 18 min.


    Notes: (h-floor(h)) is just the "fractional" component, 0.3 in the given example. Substitutions are, therefore, frac(h) and (60*h)mod(60). Similarly, viable substitutions for flr(h) are, h-frac(h), h-(60*h)mod(60).


    These things said, the algorithm in black becomes,

    h hrs = flr(h) hrs, 60*(frac(h)) min.


    Regards,


    Rich B.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Jun 2006
    Posts
    9

    Hi

    Quote Originally Posted by psylencer
    K, I can do it on paper but how do I get a peice of software like excel
    to convert 1.3 hours to 1hr 18min or 01:18?

    Any help?
    I do not think it would be possible to place the value 1 and 18 in the same box but I am certain I have a method where they can be placed in side to side boxes e.g 1 in one box and 18 in the next box on the right hand side.

    Let me know if this fulfils your requirements.
    No doubt someon else will have a better method.
    Last edited by syrivaci; June 29th 2006 at 01:46 AM. Reason: spelling
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Senior Member
    Joined
    Apr 2006
    Posts
    399
    Awards
    1
    Quote Originally Posted by syrivaci
    I do not think it would be possible to place the value 1 and 18 in the same box but I am certain I have a method where they can be placed in side to side boxes e.g 1 in one box and 18 in the next box on the right hand side.

    Let me know if this fulfils your requirements.
    No doubt someon else will have a better method.
    The TIME function can be used to put the 1 and 18 into a time value. Then that value can be formatted to produce 01:18.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Jun 2006
    Posts
    9

    Hehe

    Quote Originally Posted by JakeD
    The TIME function can be used to put the 1 and 18 into a time value. Then that value can be formatted to produce 01:18.
    I told you someone would come up with a way.
    I have a feeling some people on this forum are related to Einstein
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Newbie
    Joined
    Jun 2006
    Posts
    6
    Quote Originally Posted by syrivaci
    I do not think it would be possible to place the value 1 and 18 in the same box but I am certain I have a method where they can be placed in side to side boxes e.g 1 in one box and 18 in the next box on the right hand side.

    Let me know if this fulfils your requirements.
    No doubt someon else will have a better method.
    This would be perferct. Let it be known that excell has an fuction to convert decimal time to Hrs:Min,Secs , but only in 12, or 24 hrs I need some maths to convert 65.3 to 65hrs 18mins.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    MHF Contributor Quick's Avatar
    Joined
    May 2006
    From
    New England
    Posts
    1,024
    Quote Originally Posted by psylencer
    This would be perferct. Let it be known that excell has an fuction to convert decimal time to Hrs:Min,Secs , but only in 12, or 24 hrs I need some maths to convert 65.3 to 65hrs 18mins.
    Use this one then. (type the number you want to change in the blue box, ONLY TYPE A NUMBER!)
    Attached Files Attached Files
    Last edited by Quick; June 29th 2006 at 03:24 PM.
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Newbie
    Joined
    Jun 2006
    Posts
    6
    Quote Originally Posted by Rich B.
    Hi:

    Given input hours=h,


    h hrs = floor(h) hrs, 60*(h-floor(h)) min.


    Ex.: input: h=1.3
    flr(h)=flr(1.3)=1
    60*(h-floor(h)) = 60*(1.3 - 1) = 60*0.3 = 18.


    Output: 1.3 hrs = 1hr, 18 min.


    Notes: (h-floor(h)) is just the "fractional" component, 0.3 in the given example. Substitutions are, therefore, frac(h) and (60*h)mod(60). Similarly, viable substitutions for flr(h) are, h-frac(h), h-(60*h)mod(60).


    These things said, the algorithm in black becomes,

    h hrs = flr(h) hrs, 60*(frac(h)) min.


    Regards,


    Rich B.
    Excellent work mate! Floor works well. Thanks Heaps. I love nerds!
    Last edited by psylencer; June 29th 2006 at 03:17 PM.
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Member
    Joined
    Nov 2005
    From
    Wethersfield, CT
    Posts
    92
    Hi Psylencer:

    I am happy to have helped. In all honesty, my programing knowledge is limited. Nonetheless, I am indeed geek enough to help out with the algorithm stuff . In the words of Hewey Lewis, "It's hip to be square" (octagonal is pretty cool too).

    Enjoy,

    Rich B.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Convert Decimal to Octal using MS Excel
    Posted in the Algebra Forum
    Replies: 0
    Last Post: March 24th 2010, 05:47 PM
  2. Convert the decimal number
    Posted in the Algebra Forum
    Replies: 5
    Last Post: December 17th 2009, 04:20 AM
  3. Convert to hours from calc
    Posted in the Calculus Forum
    Replies: 1
    Last Post: November 6th 2008, 06:52 PM
  4. i need with convert fractions in to decimal
    Posted in the Algebra Forum
    Replies: 5
    Last Post: October 18th 2008, 09:51 AM
  5. how to convert a decimal to a fraction
    Posted in the Math Topics Forum
    Replies: 2
    Last Post: June 9th 2008, 04:14 AM

Search Tags


/mathhelpforum @mathhelpforum