× 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.



I saw that Luis. But 10/1/2012 converts correctly when it is in a
character field. But not when in a varying field. I do not know if that is
a feature or a bug.

thanks,
Steve



On Tue, Jan 29, 2013 at 11:35 AM, Luis Rodriguez <luisro58@xxxxxxxxx> wrote:

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 following
code converts from character to date. Each of the %date functions work
for
me except the last one. Converting from varying to date when the date
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
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.


--
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 thread ...

Follow-Ups:
Replies:

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

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.