Booth Martin (firstname.lastname@example.org) 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 Booth, 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: email@example.com (until September 30th) firstname.lastname@example.org (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: email@example.com +---
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.