Loading ...
Sorry, an error occurred while loading the content.
 

Re: Convert TIME

Expand Messages
  • diodeom
    ... ^!Set %dec%=^?{Enter minutes with decimals==2.3333} ^!Set %dec%=^$Calc(ROUND(^%dec%*60))$ ^!Set %min%=^$Calc(^%dec%DIV60)$ ^!Set %sec%=^$Calc(^%dec%MOD60)$
    Message 1 of 3 , May 3, 2010
      "bozlawless" <bozlawless@...> wrote:
      >
      > Is there a way to convert 2.3333 to 2 Minutes 20 Seconds
      >
      > OR 6.500 to 6 Minutes 30 Seconds etc
      >

      ^!Set %dec%=^?{Enter minutes with decimals==2.3333}
      ^!Set %dec%=^$Calc(ROUND(^%dec%*60))$
      ^!Set %min%=^$Calc(^%dec%DIV60)$
      ^!Set %sec%=^$Calc(^%dec%MOD60)$
      ^!Info ^%min% min : ^%sec% sec
    • Bob McAllister
      ... ^$CALC((^&*60)DIV60;0)$ minutes ^$CALC((^&*60)MOD60;0)$ seconds will replace a selected decimal representation of minutes (represented her by ^&) with the
      Message 2 of 3 , May 3, 2010
        On Tue, May 4, 2010 at 8:53 AM, bozlawless <bozlawless@...> wrote:
        > Is there a way to convert 2.3333 to 2 Minutes 20 Seconds
        >
        > OR 6.500 to 6 Minutes 30 Seconds etc
        >

        ^$CALC((^&*60)DIV60;0)$ minutes ^$CALC((^&*60)MOD60;0)$ seconds

        will replace a selected decimal representation of minutes (represented
        her by ^&) with the corresponding minutes and seconds rounded down to
        a whole second. (So note that 2.3333 returns 2 minutes 19 seconds not
        2 minutes 20 seconds - you need 2.333334 for that.)

        Bob McAllister
      Your message has been successfully submitted and would be delivered to recipients shortly.