140 pts.
 How to convert system date to other format using RPGILE
please advice how can convert system date to other format using rpgile.

Software/Hardware used:
ASKED: February 4, 2009  11:20 AM
UPDATED: March 17, 2009  4:03 PM

Answer Wiki:
Define a date field in a date format of your choice: D Sysdate S D DatFmt(*USA) or D SysDate S D DatFmt(*ISO) The first format is MM/DD/YYYY, the second is YYYY-MM-DD. Retrieve the system date: C Move UDATE Sysdate *********************************************************************** Actually UDATE is the JOB date, not the system date. You can get the system date by just EVAL SysDate = %date() As noted above, you can define the date field any way you want. *********************************************************************** If you define a date field in D-specs tou can add an Inz(*Sys) after DatFmt and this will set the variable to the system date automatically at program startup. Likewise if you add an Inz(*Job) you get the job date or UDATE value.
Last Wiki Answer Submitted:  February 4, 2009  5:27 pm  by  graybeard52   3,115 pts.
All Answer Wiki Contributors:  graybeard52   3,115 pts. , Aloniks   30 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Hi

U can also use %Date Buit in function.

Thanks
Reshma

 445 pts.

 

Just do this in your D specs
D SysDate S D datfmt(*iso) inz(*sys)

 1,780 pts.