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



Rob,

1) Use SET OPTION and DATFMT. SQL's version of an RPG H spec.
I agree. Nevertheless, this is not always possible. Maybe someone is
using a view from QRY/400. Who knows? In this case, as I stated before (or
at least tried to), when you create a DATE from a string in *ISO format, it
does not matter what your DATFMT value is, the date will be created
correctly. BUT, if you are using, say, DATFMT(*EUR) and your DATE string is
in a non-*EUR format you will have problems. Although in Venezuela (where I
live) the date format is dd/mm/yyyy, I always, always use *ISO formats in
my SQL statements. It avoids a lot of headaches...

2) Why convert to date if you're only doing comparisons and presentation?
What happens if you want compare two versions of a same object that exists
in tow libraries? You may want to know which one os the mos recent object.
With a 'MMDDYY' format (as in the ODCDAT field) this can't be done.

Hope this makes sense. It is a little confusing for me even in Spanish (my
native language) :-)

Regards,
Luis Rodriguez
IBM Certified Systems Expert — eServer i5 iSeries

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.