|
I would like to list the *OUTFILE of DSPOBJD by date.
Since DSPOBJD provides the incredibly ugly date format MMDDYY, I
would like to convert it to a date with year 99 going to the end
of the descending order.
What is a good method to do this?
Do I have to construct the date such as shown below?
But even then the year 99 pops to the top (it should be at the end).
I think I have to use DATE and CHAR and TRIM to build the date.
How do I force it to take MMDDYY and calc 1900 or 2000?
*MDY??
Is there a simpler, better way? (There must be :))
Thanks!
select ODLBNM,ODOBNM,ODOBTP
, substr(ODCDAT,5,2) || '-' || substr(ODCDAT,1,2)
|| '-' || substr(ODCDAT,3,2)
as CreateDate
, ODOBTX
from qtemp/dspqry
order by CreateDate desc
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.