[thelist] Oracle Date Swizzle?

Dean Mah dmah at shaw.ca
Tue Aug 26 14:36:58 CDT 2003


On Tue, Aug 26, 2003 at 11:16:59AM -0500, Luther, Ron wrote:

> [Currently eyeball deep in "TO_DATE(TO_CHAR(SUBSTR ( Open_Detail.Customer_Dt, 5, 2 )) || CHR(45) || 
> TO_CHAR(SUBSTR ( Open_Detail.Customer_Dt, 7, 2 )) || CHR(45) || TO_CHAR(SUBSTR ( 
> Open_Detail.Customer_Dt, 1, 4 )), 'MM-DD-YYYY')" nonsense that doesn't seem to be properly cutting 
> the cheese. Grrr.]


Which should be equivalent to:

   TO_DATE(SUBSTR(Open_Detail.Customer_Dt, 1, 8), 'YYYYMMDD')

and should be giving you the date in Oracle's datetime datatype.

Dean


More information about the thelist mailing list