Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL TO_DATE
Do a TRANSLATE on the second SUBSTR().
Example from the doc:
SELECT TRANSLATE('2KRW229',
'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ', '0123456789')
"Translate example"
FROM DUAL;
Translate example
Cheers,
-V
on 8/25/2003 7:16 PM Randy Harris said the following:
>I hope someone can help me with a SQL question. I'm attempting to construct
>a date, I have week start dates in the table:
>
>Aug 18
>Aug 25
>Sep 1H
>Sep 8
>
>However, the data can be immediately followed by other characters (Sep 1H).
>I'm trying to construct a date with this:
>
>TO_DATE(SUBSTR(Weekstart, 1,3) || ' ' || SUBSTR(Weekstart, 5,2) || ',' ||
>Year, 'MON DD, YYYY')
>
>This works fine until it hits the Sep 1H date. How can I get around this?
>
>Thanks for your help
>
>
>
>
Received on Mon Aug 25 2003 - 21:39:13 CDT