× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



NOTE:  This is v3r2 RPG-IV; the TIME op code requires a numeric result
field.

I need to retrieve the current date (NOT job date) in an RPG-IV program
compiled at v3r2 and end up storing that date in YYYYMMDD format.

Here's my snipped up code:
     h DatFmt(*ISO)    debug
     c             Time           $Time14          14 0

I was hoping that the DatFmt(*ISO) might force the TIME op code to format
the date in the result field as YYYYMMDD, but it yields MMDDYYYY.  If I do a
CHGJOB DATFMT(*YMD), then I get the desired result.  Unfortunately, I cannot
change the job's date format in production.  Is there a way to retrieve the
current date in the format I need, or a way to determine the format that the
TIME op code will generate so I can convert it as necessary at run time?

- Dan Bale
(I am *NOT* "Dale"
http://archive.midrange.com/midrange-l/200105/msg00281.html )



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.