×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
On Tue, Aug 2, 2011 at 5:32 PM, Timothy Adair <tadair@xxxxxxxxxxxxxxxx> wrote:
In the printer output specs of my program, I am attempting to
suppress the leading zero on a *DATE field. According to
the RPG ILE manual (v6r1) I should be able to do this with
a "Y" edit code.
Edit codes only apply to numeric fields, as your error message
indicated. The date type is not a numeric type. (Someone will
correct me if I'm wrong, but I believe In the old days, there was no
date type, so usually dates were stored as a number, which allowed use
of edit codes or edit words to modify how they were displayed. This
practice is still very common today.)
If you want to use edit codes, you will have to convert your date
field to a numeric type first. You can do this simply with MOVE, or
you can use built-in functions.
If reformatting dates for output is something you will be doing a lot
(and I would think it is), then my recommendation would be to bite the
bullet and write some date routines that you will use over and over
again. (I've done this to allow more flexible editing, such as
omitting the leading zero for both the day and the month, as Excel
normally does.)
John
As an Amazon Associate we earn from qualifying purchases.