|
Curaçao, Dutch Antilles. The pearl of the Caribbean. It's winter here so during the day minimal 27 degrees Celsius (about the same temperature as the sea).... Cold..... Brrrrrrr. You come along?? See you at the beach....! Eduard. rob@xxxxxxxxx wrote: Beach? Where are you at? Here it's 19 degrees Fahrenheit. >From Seinfield "It's called shrinkage!". Rob Berendt -- Group Dekko Services, LLC Dept 01.073 PO Box 2000 Dock 108 6928N 400E Kendallville, IN 46755 http://www.dekko.com Eduard Sluis Sent by: rpg400-l-bounces@xxxxxxxxxxxx 01/14/2005 02:17 PM Please respond to RPG programming on the AS400 / iSeries To RPG programming on the AS400 / iSeries cc Subject RE: Dateformat trouble with time. Hmmm, I know I'm not a walking reference for some reasons. But in this case it would have been better to have a look first in it... Ok the thing that now works for me is: DTODAY S D DATFMT(*ISO) * C TIME TODAY C MOVE TODAY $H08N0 And than I can go on with my formatting routine to make the date presentable. Thanks again. This is enough for today..... I go to the beach! Cheers, Eduard. "DeLong, Eric" wrote: Yes, that's right. *YMD is a six-digit date format identifier. If you want an eight-digit format, you must use *ISO, *USA, *EUR, or *JIS. See chapter 14 of the ILE RPG reference for details. Eric DeLong Sally Beauty Company MIS-Project Manager (BSG) 940-898-7863 or ext. 1863 -----Original Message----- From: Eduard Sluis [mailto:eduard@xxxxxxxxxxxxxxxxxxxxxxx] Sent: Friday, January 14, 2005 11:32 AM To: RPG programming on the AS400 / iSeries Subject: RE: Dateformat trouble with time. Thanks to all of you. Now I know that I should have expected it. To get to a solution I have played around a bit to find a suitable solution. Changing DATEDIT into DATFMT did not work (the job does what it likes best). So on to the TRUE date/time fields. Much to my surprise I got the next result?? Code: C TIME TODAY C *YMD MOVE TODAY $H08N0 Debug: > EVAL TODAY TODAY = '2005-01-14' > EVAL $H08N0 $H08N0 = 00050114. Interesting? Eduard. Bob Cozzi wrote: 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. -- 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. -- 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. -- 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. -- 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. -- 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.