Hi,
Below code can work for you task,
Input program.
Loop #i = 1 to 1440.
DO IF #i = 1.
Compute P1 = NUMBER(“00:00”,TIME5).
formats P1 (time5).
Else IF #i>1.
Compute P1 = NUMBER(“00:01”,TIME5) + LAG(P1).
End if.
End case.
End Loop.
End file.
End input program.
Exe.
This creates data from 0:00 to 23:59.
Also If you want 0:01 to 24:00 then change line
Compute P1 = NUMBER(“00:00”,TIME5).
to
Compute P1 = NUMBER(“00:01”,TIME5).
Let me know feedback on the same.
Discuss This Question: