Is there a way to EXPORT dates and always get yyyy format? - Forum - OpenEdge Development - Progress Community

Is there a way to EXPORT dates and always get yyyy format?

 Forum

Is there a way to EXPORT dates and always get yyyy format?

This question is answered

When I export a record with date fields, is there a way to force dates in that record to always be in the mm/dd/yyyy (4-digit year) format? (I assume it's abbreviating when possible, based on the current -yy parameter.)

Example:

def temp-table tt no-undo
    field dt1 as date format '99/99/9999'
    field dt2 as date format '99/99/9999'
    .

create tt. update tt.
output to /tmp/x.
export tt.
output close.

My input:

dt1        dt2

12/31/2020 04/01/1066

Contents of output:

12/31/20 04/01/1066

 

The problem is that if the -yy is different when the record is later imported, I might not get what I expect.

This is in 10.2b08 on RHEL.

Verified Answer
All Replies
  • Use the -yr4def client start up parameter.

    documentation.progress.com/.../

  • Sounds like exactly what I need. I'll test it. Thanks !