Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: select to_date('2004','YYYY') NOT Jan 1 2004

Re: select to_date('2004','YYYY') NOT Jan 1 2004

From: Mike Sherrill <MSherrillnonono_at_compuserve.com>
Date: Sat, 27 Mar 2004 10:10:07 -0500
Message-ID: <l66b6098r19hoc8f719i62fepcbjpmlkqq@4ax.com>


On Wed, 24 Mar 2004 13:40:10 -0500, "Jarson" <jarsonk_at_nospam.com> wrote:

>You shouldn't have to (albeit this is the point of the argument and very
>easy to work around). I didn't specify the day of the month, hour, minute
>or second either as these default to each value's start, as expected.
>
>I expected that if you tell the to_date function to convert just the year,
>it would interpret as the "start of the year". If instead as it uses the
>current month as a default, then I would expect it to also use the current
>day, hour, minute and second; but it does not.

That's one reason careful programmers don't rely on defaults. Another is that defaults have been known to change as products evolve.

-- 
Mike Sherrill
Information Management Systems
Received on Sat Mar 27 2004 - 09:10:07 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US