• Subject: RE: Build Timestamp?
  • From: "Kahn, David" <KAHN@xxxxxxxxxxxxxxxxxx>
  • Date: Sun, 28 Sep 1997 09:44:00 +0600

Booth Martin (boothm@ibm.net) wrote:

>on 09/27/97at 07:41 AM, the Great and Grand  Wazir "Kahn, David"
><KAHN@tengizchevroil.com> said:
> On our AS/400's it's set to DMY; you probably have a different
>format and will have to adjust accordingly.
>David, for old RPG go to your header line and put a Y in column # __  Oh
>darn, I forgot the number. Prompt the H line though and you'll see the
>place to put the Y.  Then *DATE and UDATE will be year-month-day for you,
>irregardless of the system value for format.  No need to swap them around.
>Also, *YEAR will be YYYY


Don't you trust the Grand Wazir? :-)  The column for the date format on
the control (H) spec is 19. However, this only affects user dates. The
TIME opcode always returns the date in QSYSDAT format, regardless of
what you have in column 19.

To retrieve both a time and date the TIME opcode is preferable to
getting them separately because there is a chance (tiny, but real) that
the clock will tick past midnight between the 2 and your timestamp will
be out by 24 hours. If you retrieve them separately, get the date first,
then the time, then the date again. Compare the 2 dates, and if they're
not equal, get the time again. Use the time along with the second date.

Dave Kahn - TCO, Tengiz, Kazakstan

e-mail:  kahn@tengizchevroil.com    (until September 30th)
         dkahn@cix.compulink.co.uk  (from  October 1st)
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
| To unsubscribe from this list send email to MAJORDOMO@midrange.com
|    and specify 'unsubscribe MIDRANGE-L' in the body of your message.
| Questions should be directed to the list owner/operator: david@midrange.com

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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

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