×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




That is correct.
The point of the original post was numeric fields that were used as 'dates' not
"D" data-type field.  But you are correct about "D" data-types (in RPG IV) and
"L" data-types in DDS.

-Bob Cozzi
www.i5PodCast.com
Ask your manager to watch i5 TV


-----Original Message-----
From: rpg400-l-bounces+bob=rpgworld.com@xxxxxxxxxxxx
[mailto:rpg400-l-bounces+bob=rpgworld.com@xxxxxxxxxxxx] On Behalf Of Jerry Adams
Sent: Thursday, February 08, 2007 7:37 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: Date conversion technique, alpha to Numeric

Bob,

I may have missed it in the thread somewhere, but I would like a 
clarification as regards Date data types. 


My understanding is that the date is stored on disk in a binary format, 
and that it retains the same value regardless of the what DATFMT's value 
is.  That is, one program would have DATFMT(*ISO) and another program 
could have DATFMT(*USA) against the same table and that it is merely the 
presentation, say on a report or display, that differs. 


That, at least, seems to be the case from what I have read and from 
personal experience.  Corrections to ambiguities and/or errors in the 
above are welcomed.

Thanks.

        * Jerry C. Adams
*IBM System i5/iSeries Programmer/Analyst
B&W Wholesale Distributors, Inc.* *
voice
        615.995.7024
fax
        615.995.1201
email
        jerry@xxxxxxxxxxxxxxx <mailto:jerry@xxxxxxxxxxxxxxx>



Bob Cozzi wrote:
There are many ways to do this.
On is to call the QWCCVTDT API. This gives you the most flexibility.
Another you can use a bunch of nested built-in functions, similar to the
following:

    YYMMDD = %Dec(%date(CCYYMMDD: *ISO0):*YMD);

-Bob Cozzi
www.i5PodCast.com
Ask your manager to start watching i5 TV.
  


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.