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



I would like to thank you all for the kind words.

On Mon, May 7, 2018 at 10:43 AM Rob Berendt <rob@xxxxxxxxx> wrote:

This is where you're most likely to see the drop of the leading digit.
values char(02132018); -- 2132018
values routines.idate(char(02132018), '*MDCCYY'); -- 2018-02-13

The cool thing is Alan really takes overloading to the extreme.

Keep in mind, that with Alan's stuff there is no need to do the char
function.
If someone tries to roll their own they'll have to handle all that.


Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1
Group Dekko
Dept 1600
Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





From: "Joe Pluta" <joepluta@xxxxxxxxxxxxxxxxx>
To: midrange-l@xxxxxxxxxxxx
Date: 05/07/2018 01:34 PM
Subject: Re: m/d/yyyy string to yyyymmdd decimal in SQL
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>



Yeah, I see your point, Rob. Especially since other single-digit
combinations (such as 392018) don't parse at all. To your point, I
think most people will store the extra zero; you'll typically only see
the 3/9/2018 with the delimiter.

Honestly, I wasn't expecting it to work as well as it did (although with
Alan I shouldn't be surprised, his code is always excellent); I was just
playing with an edge condition to see that would happen.


On 5/7/2018 11:57 AM, Rob Berendt wrote:
I think most people would have the internal zero as in 12082018 for
2018-12-28. The leading zero, as in 1282018 for 2018-01-28 is where
most
people would assume the optional part would come in. Most likely from
an
incorrect method used to convert from decimal to character.
However, if you just have to be a literalist, I can see your point and
he
should have called it mddyyyy. If for no other reason than to have
avoided this thread (and probably the only reason).


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD


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.