I am new to PRO IV and need some help. I am trying to take a date and time and add 5 minutes to it and then compare it to the current date and time. It works except between 23:55 and 00:00.
Here is my code:
$CURDATETIME = CDATE(@DATE,'MMDDYYYY') + @TIME
IF $EDION = 'Y'
$ONTIME = $ONDATETIME(9,14)
#ONTIME = CTIME($ONTIME) + CTIME('000500')
$ONTIME = CTIME(#ONTIME)
$ONDATETIME = $ONDATETIME(1,8) + $ONTIME
IF $CURDATETIME > $ONDATETIME
Any suggestions on how I can use the date and time together to account for the date change would be greatly appreciated!
Thanks in advance,
Because CTIME converts the time into a fraction of the date you can use sometime like this
#CURRENT_DATE_TIME = #CURRENT_DATE + CTIME($CURRENT_TIME)
#ON_TIME = #CURRENT_DATE_TIME + CTIME('000500')
#ON_DATE = INT(#ON_TIME)
#ON_TIME = FRAC(#ON_TIME)
$ON_TIME = CTIME(#ON_TIME)
Hope this is of some help