My input date, from a spreadsheet that comes from the a client, is a string
using the format (m)m/(d)d/yyyy, (m)m represents that there could be one or
two digits and ditto for (d)d, and I need to convert it to a decimal
yyyymmdd.
The following does it, but it seems to me that there should be an easier
way, utilizing less than four functions to do the conversion. Is there?
select BI_DOSA,
Dec( Replace(
Cast( Date(TIMESTAMP_FORMAT( BI_DOSA, 'MM/DD/YYYY'))
as Char(10)),
'-', ''),8)
from CA8560BIP
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.