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