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



Ahhhh - you beat me to it

Paul - are you thinking about the mmddyy format of a date?
Doesn't that translate to what you are talking about?
I forget the threshold - something like 123139, is 2039-12-31, then if you add one day 010140 becomes 1940-01-01
Or something like that

Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Rob Berendt
Sent: Thursday, December 21, 2017 8:36 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Re: Valid dates allowed by the operating system

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

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.