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

[Clip] Re: min+sec

Expand Messages
  • Kay Roath
    08/25/1999 3:49 AM BONG wrote ... Here s a test clip for hours/minutes. It seems to work :) & should give you some idea of the math needed. H=TestMinute ^!Set
    Message 1 of 3 , Aug 25, 1999
    • 0 Attachment
      08/25/1999 3:49 AM BONG wrote

      > I need guideliness on a clip that would add minutes and seconds:
      > 1:24 + 0:45 = 2:09

      Here's a test clip for hours/minutes. It seems to work :) &
      should give you some idea of the math needed.
      H=TestMinute
      ^!Set %min1%=^?[]
      ^!Set %min2%=^?[]
      ^!Set %min%=^$Calc(^%min1%+^%min2%)$
      ^!If ^%min%>59 GetHour ELSE Done
      :GetHour
      ^!Set %temp%=^$Calc(^%min%/60;2)$
      ^!Set %hour%=^$Calc(Int(^%temp%))$
      ^!Set %temp%=^$StrCopyRight("^%temp%";3)$
      ^!Set %min%=^$Calc(^%temp%*60;0)$
      :Done
      ^!Info ^$Calc(^%min1%+^%min2%)$>>^%hour%:^%min%
      ;Grandma Kay 08-25-99
    Your message has been successfully submitted and would be delivered to recipients shortly.