|
You should be storing the date/time in true date/time variables not the old 14-digit zoned numeric fields. That way you don't care what the format is. D Today S D D rightNow S T C TIME Today C Time RightNow Then you can MOVE those values into non-date or non-time fields using the MOVE opcode and thereby specify the resulting formats in Factor 1 of the MOVE. C *YMD MOVE Today H08N0 -Bob Cozzi -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Eduard Sluis Sent: Friday, January 14, 2005 10:20 AM To: RPG400-L Midrange Subject: Dateformat trouble with time. Dear all, Much to my disgust I have encountered the following problem with TIME. In indefinite running batchjobs (servers) we use the TIME to get to the correct date independent of the actual jobdate. We assumed that the format we would get the date part of the time in would comply with the H DATEDIT(*YMD) header specification we use in all our programs. Recently we discovered that this is not the case and the dateformat is in the *SYSVAL format. So when the *SYSVAL is *DMY we get as time: $H14N0 = 17195413012005. When the *SYSVAL is *YMD we get as time : $H14N0 = 11503120050114. Should I have expected this?? Kind regards, Eduard Sluis. -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
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.