Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Y2K question
On Wed, 5 Aug 1998 11:41:38 -0500, "Dave Morse"
<dmorse_at_nospam.cinergy.com> wrote:
>Actually, I disagree with your comment that the TO_DATE function converts
>the datatype VARCHAR2 to the datatype DATE using the specified format. My
>initial exposure to the TO_DATE function (many moons ago) led me to believe
>that the format parameter was the picture of how the date was being
>converted to. But, actually, the format parm tells the TO_DATE function how
>the VARCHAR2 variable is formatted, not how to format it. The function
>converts it to the default system date.
>
>Cheers!
Nothing personal, but you're confused.
TO_DATE(string, format)
converts the specified string to a date, the string being in the
format specied by 'format'
There is no format that to be converted too: the result is a date
type, pure and simple. It has no 'format' until it's converted back
into a string (it does have a date component, and a time component,
which may well be set to midnight, but it does exist).
If you want a function to convert something to the default system
date, then try using SYSDATE...
--
Tommy Wareing
MIS Group
Learning Resources
Oxford Brookes University
01865 483389
Received on Thu Aug 06 1998 - 05:15:50 CDT
![]() |
![]() |