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

Home -> Community -> Usenet -> c.d.o.server -> Re: Use of to_date function

Re: Use of to_date function

From: Timo Haatainen <Timo.Haatainen_at_tietogroup.com>
Date: 1997/11/19
Message-ID: <34728758.5ADD@tietogroup.com>#1/1

Jonathan Gennick wrote:
>
> On Tue, 18 Nov 1997 11:15:20 -0600,
> stamp.dean_at_corona.navy.mil wrote:
>
> >Does anybody know if you can use the to_date function to select on both a
> >date and time without typing in the format? For example, I want to do:
> >
> >select datetime from a.view where datetime = to_date('05-AUG-97 11:13:42')
>
> I always put in the format, and I highly recommend doing it.
> The reason for that recommendation is that the default
> format can be changed. You wouldn't want your queries to
> "break" if someone did that.
>
> For example, on my system at work, the default is mm/dd/yy.
>
> Offhand I don't remember where that can be set. It seems
> like there are a couple of possible places, but I'd have to
> check the manual to be sure.
>
> --Jonathan
>
> ------------------------------------
> gennick_at_worldnet.att.net
> http://home.att.net/~gennick

You can change the default date format for a session with a command alter session set nls_date_format = '<date format>'

-- 

Timo Haatainen
Carelcomp Forest Oy
Received on Wed Nov 19 1997 - 00:00:00 CST

Original text of this message

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