AnsweredAssumed Answered

Stop ADD_TIME rollover?

Question asked by Michael_Coxson_5769 on May 10, 2016
Latest reply on May 11, 2016 by Michael_Coxson_5769
Typically the rollover function from 23:59 to 00:00 for ADD_TIME is useful, but I am attempting to create a schedule-building job and I need to have a way to have it stop incrementing when it hits the end of day.  I checked the documentation but there isn't any obvious way to do this that I can see.  Is there an easy way to do this or am I going to have to write some workaround?

Example:
:BEGINREAD "Please input the following:"
:  READ &STARTTIME#,,"START TIME (HHMMSS)","000000",
:  READ &ENDTIME#,,"END TIME (HHMMSS)","235900",
:  READ &INCREMENT#,,"RUN EVERY (HHMMSS)","001000"
:ENDREAD

:SET &TIME# = &STARTTIME#
:WHILE &TIME# < &ENDTIME#
:  SET &CLOCKTIME# = ADD_TIME(&TIME#, "000000", "HH:MM")

(misc code adding a scheduled execution using the &CLOCKTIME# to xml)

:  SET &TIME# = ADD_TIME("&TIME#", "&INCREMENT#")
:ENDWHILE

Outcomes