[thelist] Oracle Date Swizzle?

Luther, Ron ron.luther at hp.com
Wed Aug 27 07:28:19 CDT 2003

Dean Mah noted an equivalence in form:

>>TO_DATE(SUBSTR(Open_Detail.Customer_Dt, 1, 8), 'YYYYMMDD')
>>and should be giving you the date in Oracle's datetime datatype.

Hi Dean,

Sorry - the problem was not with my SQL (or the SQL suggested by you or 
Matt).  The problem was a gap in my knowledge in working with this 
particular report writer.

As it turns out there is a contextual menu available by right clicking 
items in the gui for the 'Select f1, f2, f3' portion of the SQL that 
allows you to 'cast' the returned field. (I had mistakenly assumed it 
was a read-only parameter.) By setting my computed field to return a 
'date' it does, indeed, return a proper date.

Who now just has to work out the 'Decode(sign(date-5),blah, blah)' 
syntax to get the categorizations he wants. Minimum Sweat.  ;-)

More information about the thelist mailing list