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



Hi Everyone,

For all you SQL experts, is there a simpler way to compare an IBM 7-digit
date (cyymmdd) to a date type variable in SQL?  Currently I have this:

SELECT date, date7
 FROM testlib/test
 WHERE
 substr(char(date),1,4) concat
 substr(char(date),6,2) concat
 substr(char(date),9,2) =
 char(date7+19000000)

date7 is a numeric 7.0 cyymmdd
date us a date field
and the assumed date format is *ISO.

tia,
Peter Dow
Dow Software Services, Inc.
909 793-9050 voice
909 793-4480 fax
909 522-3214 cell



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.