|
<rpg400-l@xxxxxxxxxxxx>
To:
"RPG programming on the IBM i (AS/400 and iSeries)"
an
Subject:
Re: Converting a date
I am lost here. If we have a numeric value, why are we converting it to
alpha value?
d NumDate...
d s 8p 0 Inz(20140101)
d DateField...
d s d
d NumDateUSA...
d s 8p 0
d NumDateAlpha...
d s 10a Inz('01/01/2014')
DateField = %Date(NumDate:*ISO); // or whatever format you need.
// convert to *USA format.
NumDateUSA = %Dec(%Date(NumDate:*ISO):*USA);
NumDateUSA should be 01012014.
DateField = %Date(NumDateAlpha:*USA/);
etc.
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.