On Thu, Jul 20, 2017 at 8:48 AM, Alan Shore <ashore@xxxxxxxx> wrote:

Here is my situation
We have data in a file that hold the date in separate character fields
One field for Month (mm format)
One field for Day (dd format)
And
One field for year (ccyy format)
The system is decades old, and that is why I am using iDate
However, a lot of the results of iDate, do not translate, and they shouldnt
For example - the string is 20164119, or 20162118 are NOT valid dates

My question is, using idate, how can I display JUST these records
I have tried
SELECT REC_DATE, WONUM FROM examplea where rec_date isnull
Where rec_date is the result of iDate, but Token ISNULL was not valid is
the result of that query


I see that Luis already helped, but this reminded me of a shop that defined
four fields for any given date: CC, YY, MM, DD. Apparently, this was a
carryover from before Y2K, because many of the defined dates didn't have
the CC field defined. The best part about this is that this shop is in the
financial industry. You know what happens when you deal with 30-year
mortgages written after 2009? You get to deal with the year 2040 when dates
have no century digits. Fun stuff using windowing logic in RPG programs.
I wrote a UDF to deal with that.

Anyway, I'm glad you mentioned iDate. I missed that somehow, but will add
that to my toolset.

- Dan

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.