Re: SQL - Date-Q

From: Steve Cosner <stevec_at_zimmer.CSUFresno.EDU>
Date: 1996/08/14
Message-ID: <4utgmd$ih3_at_zimmer.CSUFresno.EDU>#1/1


In article <32108E68.759B_at_enator.se>, Per Andersson <per.andersson_at_enator.se> wrote:
>Hello!
>
>I have a "Date" stored as CHAR.
>Example: 1996333 (fmt = YYYYWWD, year week day_of_week)...
>Why cant I do a TO_DATE('1996333','YYYYWWD') on this string?
>Oracle returns ORA-01820: format code cannot appear in date input format

Because WW is not a valid format element in the TO_DATE function. You CAN use the WW element when converting a date to character, (example: TO_CHAR(any_date,'YYYY WW D') ), but not the reverse.

Regards,
Steve Cosner Received on Wed Aug 14 1996 - 00:00:00 CEST

Original text of this message