Hi Al
I JUST went through a project with the exact same problem
I posted my questions on this board and received MANY responses
To cut a LOOONG story short, my problem was that the numeric field containing the date, did in fact contain some invalid dates, that I could not get around
Many people suggested using iDate, which I eventually loaded onto all of our systems, and am now using to great effect.
By using iDate, I was able to circumvent the invalid dates
My suggestion is to save yourself all the anguish and headaches that I had, and load the iDate to your system
If you do a Google search on
idate as400
you will be able to look at many web pages
Alan Shore
Programmer/Analyst, Direct Response
E:AShore@xxxxxxxx
P:(631) 200-5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Al Nelson
Sent: Thursday, September 08, 2011 1:15 PM
To: RPG400-L@xxxxxxxxxxxx
Subject: SQL and Dates, help needed
I'm trying to select all the records in a file that have yesterday's date.
The field in the file is defined as numeric 8 positions and 0 decimals.
It is in a YYYYMMDD format.
I would think a Select with Current Date - 1 would work but is does not.
any suggestions.
thanks
al
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.