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 graybeard523,115 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
Hi
U can also use %Date Buit in function.
Thanks
Reshma
Just do this in your D specs
D SysDate S D datfmt(*iso) inz(*sys)