×
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 12 Apr 2013 08:42, Stone, Joel wrote:
It seems that the consensus is to NOT convert to a date format,
rather leave it as MM/DD/YY.
That doesn't make sense to me as I am DSPOBJD of all *QRYDFN's
in a lib and then displaying the output by descending order of
Create-date or Last-Used-Date.
Ugh! No mention was made of any other date fields. The Last Used
Date may be blanks :-( That is definitely not going to be compatible
with casting to DATE!
The old 1999 stuff will appear at the top of the list - which is
not what is desired.
Of course a sorting by blanks for /not used/ is probably acceptable.
Or the NULL value for any blank date.
Here is the code I came up with. I am thinking that I will change
to ISO date as several have suggested so the JOB date format
doesn't come into play.
FWiW the *USA date format is, as I recall, /easier/ to convert from
MMDDYY, because the digits are already in the correct order.
If using the other non-displayed /date-like/ MMDDYY values, because
the others can have /blank dates/ I would recommend just creating a UDF.
I have two; one for the date-like and time-like values, that handles
blanks. I may or may not have the code for leap adjust issues with
29-Feb. Of course a simple NULLIF(mmddyy_field, '') is simple enough to
cause the whole expression to yield the NULL value for a blank date.
The UDF however would also yield the NULL value for garbage inputs; e.g.
if there was a blank for the ODxCEN but not the ODxDAT column.
As an Amazon Associate we earn from qualifying purchases.
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.