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




On 24/10/2008, at 4:10 AM, Vern Hamberg wrote:

The point of this is, the CVTD MI documentation talks about specifying
that the format is unknown - might also have something like that in the
time and timestamp functions. But it is perhaps worth exploring.

CVTD supports unknown date, time, and time-stamp BUT it only handles a subset of the possible formats. The documentation states:

*Unknown
-- Used to reference unique SAA formats. This format is used only when the format is NOT known. This format tries to find a matching format. The formats that will be scanned for are: USA, ISO, EUR, JIS (dates and times), *YYYDDD (date), SAA time-stamp, and *YYYYMMDDhhmmss time-stamp. When a valid match is not found either a data, format, or value exception will be signalled.



It should be obvious why this instruction has been implemented in this manner. As has been discussed in this thread certain dates cannot be resolved to any of YMD, DMY, or (the weird) MDY formats. Same is true of those formats with a century guard digit. If this instruction were to attempt resolution of YMD, DMY, or MDY formats it would, at some point, simply have to guess. Any guess will simply piss off the 2/3rds of the world that does not use that format.

While the instruction template does allow the caller to specify the preferred format from which to START scanning the unknown date it does not allow the caller to indicate a preference for interpreting non-SAA formats because it does not support them.

Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software OS/400, i5/OS Technical Specialists

http://www.flybynight.com.au/
Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------




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.