Yes, the program is now working and the results are fantastic!
You are correct about the first two case statements having the same code. I combined them as shown below. I also combined the same in the DO CASE for the END times with an OR.
DO CASE
CASE iEarlyOrLateMinutes > 15 OR iEarlyOrLateMinutes < 0
cEffectiveStartHour=cActualStartHour
cEffectiveStartMinute=cActualStartMinute
OTHERWISE
cEffectiveStartHour=cScheduledStartHour
cEffectiveStartMinute=cScheduledStartMinute
ENDCASE
cEffectiveStartHour=ALLTRIM(cEffectiveStartHour)
cEffectiveStartMinute=ALLTRIM(cEffectiveStartMinute)
cEffectiveStartTime=;
PADL(ALLTRIM(cEffectiveStartHour),2,"0")+;
':'+PADL(ALLTRIM(cEffectiveStartMinute),2,"0")
>Do you mean to say that it's working now?
>By the way, I notice that in all the three Do-Case constructs the first and second case statements give the same results.