|
Date fields do not have a programmer-definable layout. They are date
fields and hold only valid dates. My sometimes vague memory says the
date field is actually a 4 character binary field, maybe a Lilian date?
*mdy is not a valid date. Specifying *mdy in the header is only telling
the program how the programmer wants the date to look in that program.
Because of that, I never specify a default in the header, or anywhere
else. Let the date field deal with however it wants to store it. I
only use a format to tell the date field what I am giving it, or to tell
a display or printer file how I want a user to see it. Since
presentation of the date varies so widely even in the same program, I
prefer to define the format to use at the point of use.
On 4/16/2014 2:01 PM, Charles Wilt wrote:
You have a problem...it
In order to work with a date of 9999-12-31, you're going to have to have
datfmt(*ISO) or datfmt(*usa)..
I don't suppose you have a CMS that you could use to track down who and
when the datfmt(*mdy) was put in? As it sounds like it was done in
response to a problem. And knowning why it was done means you could fix
the "right" way.to
If this program is doing I/O to a display file, it's probably something
do with moving the 6 digit screen date to the DB. You'll need to changewrote:
that code to convert between *mdy and *usa or *iso.
There's a reason I always have
datfmt(*ISO) timfmt(*ISO)
Charles
Good luck
On Wed, Apr 16, 2014 at 2:05 PM, Horn, Jim <jim.horn@xxxxxxxxxxxxxx>
in
I have a file that contains a date field with a value of 9999-12-31. I
need to "chain" this record into a program that has an Hspec of
datefmt(*mdy). I am getting error RNQ0114, Date or timestamp value not
works.correct range. If I change the program to datefmt(*usa) the chain
The program specs say I need to use datefmt(*MDY). Tried entering a D
spec with the field name with DATEFMT(*mdy). Didn't work. Any ideas?
Jim
--
--
Booth Martin
www.martinvt.com
(802)461-5349
Skype: booth.martin
Men ought to know that from the brain and from the brain only arise our
pleasures, joys, laughter, and jests as well as our sorrows, pains,
griefs and tears. ... It is the same thing which makes us mad or
delirious, inspires us with dread and fear, whether by night or by day,
brings us sleeplessness, inopportune mistakes, aimless anxieties,
absent-mindedness and acts that are contrary to habit... -- Hippocrates
(c. 460-c. 377 B.C.), The Sacred Disease
--
This is the RPG programming on the IBM i (AS/400 and 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.