Previous Topic: Techniques in RPG III ProgramsNext Topic: RPG III Job Name/Operator ID


Handling Dates in RPG III

All dates should always be converted to YYMMDD or CYYMMDD format before being output to a database file.

Remember that dates obtained from use of the RPG III TIME operation are in the format specified by the OS/400 QDATFMT system parameter, while the format of the RPG III UDATE field depends upon the H specification of each individual RPG III program.

The program header specification should have a Y in column 39, to ensure that UDATE is present in YYMMDD format, regardless of system date format.