Have you tried "real" date fields?
CREATE TABLE QTEMP/PAUL (MYDATE DATE NOT NULL WITH DEFAULT)
Table PAUL created in QTEMP.
INSERT INTO QTEMP/PAUL (MYDATE) VALUES(date('2096-12-31')) WITH NC
1 rows inserted in PAUL in QTEMP.
SELECT * FROM qtemp/paul
SELECT statement run complete.
MYDATE
2096-12-31

However, you must also ensure this is set correctly:
STRSQL
F13=Services
1. Change session attributes
Date format . . . . . . . . . *ISO

With SQL embedded into RPG you would use
set option datfmt = *iso



Rob Berendt

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.