|
Steve,
I think your date should be '10/01/2012' (please note the leading zero for
the month).
Regards,
Luis Rodriguez
IBM Certified Systems Expert — eServer i5 iSeries
--
On Tue, Jan 29, 2013 at 11:56 AM, Steve Richter <stephenrichter@xxxxxxxxx
wrote:
can someone confirm that this code bombs on their system? The followingfor
code converts from character to date. Each of the %date functions work
me except the last one. Converting from varying to date when the datelist
format is *USA.
** --------------------- ConvertTester --------------------------
** test conversion of string to date.
pConvertTester b
dConvertTester pi
d ch30 s 30a
d dt1 s d
d vary30 s 30a varying
/free
// convert character date in *iso format.
vary30 = '2012-10-01' ;
ch30 = vary30 ;
dt1 = %date(ch30:*iso) ;
dt1 = %date(vary30:*iso) ;
// convert character date in *usa format.
vary30 = '10/1/2012' ;
ch30 = vary30 ;
dt1 = %date(ch30:*usa) ;
// this bombs.
dt1 = %date(vary30:*usa) ;
/end-free
p e
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxx--
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-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.