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: how to change date format to include time?

Re: how to change date format to include time?

From: Tim Witort <trwAT_at_ATmedicalert.DOTorg>
Date: 1997/07/30
Message-ID: <33DF86D3.3A87@ATmedicalert.DOTorg>#1/1

hongs_at_lge.co.kr wrote:
>
> In article <5rkgu7$7cu$1_at_nntp.Stanford.EDU>,
> afliu_at_leland.Stanford.EDU (Annabel Fang Liu) wrote:
> >
> >
> > Hi,
> >
> > I am trying to change the date format in oracle 7.3.2 to include
> > hour and minute. I would like to change the date format to be
> > something like '199901012259'. Can anyone help me?
> >
> > Thanks.
> >
> > -Annabel
> >
> > --
>
> set the NLS_DATE_FORMAT parameter to "YYYYMMDDHH24SS". You can set this
> param in initSID.ora file or use ALTER DATABASE SET ...command. Note that
> ALTER..command only applies for that session.

That would be the ALTER SESSION SET... command, not DATABASE.

BTW, I set the NLS_DATE_FORMAT paramter in the init.ora on one of my instances thusly then started up the database:

NLS_DATE_FORMAT='DD-MON-YYYY HH24:MI:SS' And selecting sysdate from dual still returned the date in the standard 'DD-MON-YY' format. I also tried the setting using double quotes instead of single, but got the same result. Altering a session and setting the NLS_DATE_FORMAT did, indeed, change the format returned.

I have no need to make the change to my init.ora's, but I'd like to know why the parameter has no effect. Anyone?

Received on Wed Jul 30 1997 - 00:00:00 CDT

Original text of this message

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