5 Replies Latest reply: Nov 22, 2015 7:16 AM by Olly Bond RSS

    Adding to Time

    Jim Weeks

      In Monarch 10.5, is there a way to add to a time that has been imported and formatted as time?  For example, the Time is 10:02 AM but I would like to adjust for time zone by adding an hour.

       

      Thanks!

      Jim Weeks

        • Re: Adding to Time
          Olly Bond

          Hello Jim,

           

          Yes, this is do-able with Hour()+1 and other Time functions in calculated fields. There's a useful conversion function to UnixSeconds where +60 or +3600 gives you an easy way to avoid any modulo arithmetic.

           

          Best wishes,

           

          Olly

            • Re: Adding to Time
              Al Rice

              I am drawing a blank to solve a similar problem.  I merely want to add HH:MM to given times to calculate the extended time.  For example:  9:34AM + "03:27" will equal 01:01PM.

               

              Any suggesting to add the base time of 9:34AM to the Text value of the additional time of 3 hours and 27 minutes to get to my desired results of 01:01PM?

               

              Thanks kindly for any support.

                • Re: Adding to Time
                  Lovely Gonzaga

                  Hi Al,

                   

                  You can use two functions of Monarch to compute this, SecondsToChar(seconds) which converts a number of seconds to a time string and CharToSeconds(timestring) which converts a time string to a number of seconds.

                   

                  I also sent you a detailed explanation in the Support ticket you have opened with us.

                   

                   

                  Thanks,

                   

                  Lovely Gonzaga