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



Thanks.



On 11/8/2010 12:29 PM, Alan Campin wrote:
Do a F13 in STRSQL and you will see that the output format is set to MDY.
Change to ISO and you will see the dates in ISO format.

On Mon, Nov 8, 2010 at 11:24 AM, Gqcy<gmufasa01@xxxxxxxxx> wrote:

OOPS,
My question should be:
WHY does the dates in green screen (STRSQL) show as "MM/DD/YY"???
( I ran the same query in System i nav. and I got ISO dates...)


On 11/8/2010 12:14 PM, Gqcy wrote:
here is my UDF code.
My dates return as "MM/DD/YY".
What Do I need to put in to have them return as ISO ("YYYY-MM-DD")?


CREATE FUNCTION XYZLIB/NUMTODATE (INNUM DEC(8))
RETURNS DATE
LANGUAGE SQL
CONTAINS SQL
EXTERNAL ACTION
DETERMINISTIC
BEGIN
DECLARE RTDATE DATE;
SET RTDATE = Date(Substr(Digits(INNUM), 1, 4) concat '-' concat
Substr(Digits(INNUM), 5, 2) concat '-' concat
Substr(Digits(INNUM), 7, 2)) ;
RETURN RTDATE;
END

Thanks so much...




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.