can someone pls tell what is the difference between *date and udate
Announcement
Collapse
No announcement yet.
diff between *date and udate?
Collapse
X
-
Re: diff between *date and udate?
UDATE returns a 6-digit date, with 2 digits for the year.
*DATE returns a 8-digit date, with 4 digits for the year.
-
Re: diff between *date and udate?
Additionally, from the ILE RPG Reference Manual, << the user date special words (UDATE, *DATE, UMONTH, *MONTH, UDAY, *DAY, UYEAR, *YEAR) allow the programmer to supply a date for the program at run time.>>Philippe
Comment
-
Re: diff between *date and udate?
... but don't forget both (*DATE and UDATE as well as UDAY, *DAY, UMONTH, *MONTH, UYEAR and *YEAR) return the job date and not the current or system date. To retrieve the system date you either have to use the opcode TIME or the Built-in-Function %Date() without parameters.
The job date is the date when the job started, while the system date is the current date. For example, if some one starts a job on monday morning and does not signoff before friday, *DATE and UDATE return still the monday's date.
Birgitta
Comment






Comment