Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: TO_DATE processing
What this means is that if you don't provide enough information for Oracle, it will use defaults. For example:
to_date('28-SEP-98','DD-MON-YYYY') does not, as I expected, produce an error. Instead, Oracle assumes that the Hundred century part is 0 and stores it as the first century date 20 September 0098. Putting the FXYYYY format specifier in forces the year part to be fixed and so it must appear as a four digit year.
Is this what you were looking for?
David
"Gautam H. Mudunuri" <gmudunuri_at_informatica.com> wrote:
>Hi,
>
>The Oracle server manual describes the default behavior when 'FX' (format
>exact) is not specified to to_date. It says:
>
>1. Without FX, punctuation and quoted text in the character argument need
>only match the length and position of the corresponding parts in the format
>model.
>
>2. Without FX, extra blanks in the character argument are ignored.
>
>The above two statements do not describe the behavior in enough detail.
>I've tried various examples to figure out Oracle's to_date algorithm. In
>some cases a space in the character argument matches a punctuation in the
>format argument. In other cases it does not. All this is confusing! Is
>there some other documentation or other FAQ resource that explains this
>algorithm more clearly?
>
>Please reply by email or CC me on your reply-post.
>
>Thanks in advance,
>-Gautam
>
>gmudunuri_at_informatica.com
>
>
David Greensmith :-)
(david_at_green1.demon.co.uk)
Received on Mon Sep 28 1998 - 00:00:00 CDT