|
Thanks for the advice, I will take it into consideration in my future
development.
Scott Klement wrote:
Hi,
You need the code to look more like this
Result = %int(%char( %date(udate):*iso0)))
%Date requires 1 parm to work. Hope this helps.
AS other people have already pointed out, you don't need to specify an
argument to %date(). By itself, it returns the current system date.
I would like to add, that the way you did it (with UDATE) will return
the JOB DATE rather than the SYSTEM DATE. In other words, UDATE is the
date that your job started (when you signed on or the SBMJOB command was
executed, etc) If your program runs past midnight, the job date and
system date won't match anymore -- the job date won't change, but the
system date will.
It's my recommendation that people never use UDATE or *DATE or anything
else that retrieves the job date. It's just as easy to get the current
date using %date(), and it'll lead to far fewer complications as time
goes on and your program is used in more different environments.
So, use %date(). Never UDATE or *DATE.
--
Weyco Group -
Florsheim, Brass Boot, Nunn Bush, Stacy Adams
Duane Kehoe Phone # 414.908.1814
EC / Programmer / Analyst Fax # 414.908.1610
Email: dkehoe@xxxxxxxxxxxxxx
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.