Re: TO_DATE() Function
Date: Sat, 18 Nov 2000 23:06:52 GMT
Message-ID: <3A170BCE.389F8168_at_sympatico.ca>
Mike,
The to_date() function transalates a character input, in your case
01/01/1900 to a date that oracle can understand. In order for oracle to
know what you are passing, you have to preformat the data being passed.
In your example, the correct usage of to_date would be
to_date('01/01/1900', 'dd/mm/yyyy'). The to_date function doesn't do the
conversion you are looking for. You have to preprocess the data to
extract the quarter based on the month and pass that to the to_date
function.
Hope that helps.
Mike wrote:
> I am trying to write a TO-DATE( ) I am creating a table using a select
> statement :
>
> create table newtable
> as
> select data1 newdataname1,
> data2 TO_DATE('01/01/1900', 'YYYYQ') newdataname2
>
> What is the correct syntax for this TO_DATE() function so that
> conversion is done for the year and quarter (YYYYQ) ?
>
> Thanks
Received on Sun Nov 19 2000 - 00:06:52 CET