Consultor Eletrônico



Kbase P12456: How to force a 4-digit year using the PUT UNFORMATTED statement?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   12/14/2009
Status: Verified

GOAL:

How to force a 4-digit year using the PUT UNFORMATTED statement?

FACT(s) (Environment):

Progress 7.x
Progress 8.x
Progress 9.x
OpenEdge 10.x
All Supported Operating Systems

FIX:

The export statement uses two digits for the year for a date field.

A workaround is the use of the PUT UNFORMATTED statement.

The following is an example of how to export a date with four digits for the year:

OUTPUT TO export.txt.
FOR EACH order WHERE order.ordernum < 20 NO-LOCK:
PUT UNFORMATTED order.custnum order.orderdate FORMAT "99/99/9999" SKIP.
END.
OUTPUT CLOSE.