Date Format script Progress 4GL

2.7k views Asked by At

mvl_dtmov is my data attribute which I would like to output in dd/MM/YYYY format. Does anyone know how to define it?

DEF STREAM st1.
OUTPUT STREAM st1 TO c:\temp\movimentos.csv.
ASSIGN SESSION:DATE-FORMAT = "mdy".

FOR EACH multipos.mp_mvlj  NO-LOCK:

   PUT STREAM st1 UNFORMATTED multipos.mp_mvlj.mvl_dtmov ";" SKIP.

END.

OUTPUT STREAM st1 CLOSE.
1

There are 1 answers

0
carl verbiest On

Why do you set date-format to "mdy" if you want "dmy" ? Use dmy and set year-offset to 0 to force 4 digit year

SESSION:DATE-FORMAT = "dmy".
SESSION:YEAR-OFFSET = 0.