|
The issue was that the date in the table was a date data type in
*ISO format. The embedded SQL was using the date format for the
job when it retrieved the records which was *MDY. The result was
placing mm/dd/yy into a date expecting to receive yyyy/mm/dd.
Adding the DATFMT(*ISO) option to my SET statement corrected the
issue.
As I'm typing this I'm wondering why it matters. If the date in
the table is a date data type and the field in the result set is
a date data type why would the representations matter? Maybe it
really is a bug? Or, is the value SQL places into the result set
the same representation it would use if displaying on the screen?
CRPence wrote on Wednesday, April 14, 2010 14:20:
What does DATFMT() show in PRTSQLINF? How is the variable
ReceivedBack declared according to the listing? Does the
returned data match the expected format; i.e. the SQL date
format? If the LIKE declared variable appears other than as
DATE(10), what if the variable is declared instead, explicitly
as an alphanumeric with a length of 10 bytes?
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.