Re: TO_DATE clarification

From: Christopher Beck <clbeck_at_us.oracle.com>
Date: Tue, 30 Jun 1998 18:30:00 GMT
Message-ID: <359a2c97.19952930_at_dcsun4.us.oracle.com>


On 30 Jun 1998 13:53:07 GMT, dw724_at_cleveland.Freenet.Edu (Dennis M. Hancy) wrote:

>
>I need some basic understanding to the TO_DATE function. I think I know how
>it works, but I would appreciate it if someone could confirm what I think I
>know about it!
>
>First of all, is it true that the function takes two arguments? The first
>being the character string you want to convert, and the second being the
>format that the first string is in?

Yes.

>
>Now, if this is true.. suppose I need to convert the string "January 5, 1996".
>Would this be the correct syntax of the TO_DATE function:
>
>to_date('January 5, 1996', 'MMMM D, YYYY') ?

No, to_date( 'January 5, 1996', 'Month, dd, yyyy' )

>
>Can someone also tell me what all the date/time conversions are? For
>example, is "MMMM" the right format specifier to indicate that the name of
>the month is spelled out? Is anyone aware of any online documention on
>this subject? Or better yet, can someone recommend a reference manual where
>I can look up this stuff on my own?

The Oracle SQL Reference Manual has a listing of all the date format  elements.

>
>Thanks for any light you can shed on this!
>
>You can either email me at:
> dennishancy_at_eaton.com or
> dw724_at_cleveland.freenet.edu
>
>Alternatively, you can post your response here. Thanks again.
>
>
>Dennis
Received on Tue Jun 30 1998 - 20:30:00 CEST

Original text of this message