× 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 05 Sep 2013 11:07, Robert Clay wrote:

I tried making the changes *YMD and *PERIOD (just to test) in the
JDBC settings in Run SQL Scripts... and the session re-connected
successfully. But, when I ran the statement, I still got MM/DD/YY
format with LOCAL:

SELECT CHAR(StartDate, LOCAL), CHAR(EndDate, LOCAL)
FROM (SELECT MIN(dayid) as StartDate, MAX(dayid) AS EndDate
FROM mySchema.ludate
WHERE yearid = '2014' AND datemn = '01'
) A


The connection setting to effect *YMD is the effective equivalent to the SET OPTION DATFMT. In that case, to use the option that was established for the SQL environment\session, omit the "LOCAL".

The LOCAL setting is a redirection to the DATFMT() of the /job/ in which the SQL runs; i.e. the DATFMT() comes either from the date format resolved at job initialization, or from the date format established via CHGJOB DATFMT(as_desired).

To get the *YMD in the given scenario, the first line of the query would be modified to the following, whereby neither invocation of the CHAR cast function would specify a second argument:

SELECT CHAR(StartDate), CHAR(EndDate)


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.