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