|
Michael, Check out the date routines in my free "xRPG" library: http://www.rpgnext.com/docs/rnbdates.php As long as you are at V5R1+ you could use any of these. Using my procedures, there are several ways to do the following, the easiest being: c eval Date8 = dateAsInteger( c %date(Date8) + %days(1) ) Visit my documentation to see what all comes with the library: http://www.rpgnext.com/docs/ Or visit my download center for download and installation: http://www.rpgnext.com/downloads.php Thanks! Joel http://www.rpgnext.com On Wed, 2003-08-06 at 17:29, Michael Naughton wrote: > Out of curiosity, is there a way to eliminate the MOVE in the following > code: > > D Date8 S 8 0 INZ(20031231) > D IsoDate S D > > C Eval IsoDate = %date(Date8:*iso) > C isodate adddur 1:*DAYS IsoDate > C move IsoDate Date8 > > WITHOUT using /free format? > > I am at V5R1 > > Thanks! > > RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> writes: > >Peter, regarding your last question: > > > >To put current date into a character variable with no separators, > >you can code: > > > > CurDate = %char(%date():*mdy0); > > > >Likewise, to put current time into a character variable with no > >separators, you can code: > > > > CurTime = %char(%time():*hms0); > > > >To go from current time to number of milliseconds past midnight, you > >can code: > > > > Millisecs = %diff(%time():t'00.00.00':*seconds) * 1000; > > > >BTW, *MS duration code is not allowed when you're computing the > >difference between two times. > > > >Cheers! Hans > > > Mike Naughton > Senior Programmer/Analyst > Judd Wire, Inc. > 124 Turnpike Road > Turners Falls, MA 01376 > 413-863-4357 x444 > mnaughton@xxxxxxxxxxxx > > > _______________________________________________ > 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.