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: timestamp and date format

Re: timestamp and date format

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 9 Dec 2006 15:32:48 -0800
Message-ID: <1165707168.848757.117510@n67g2000cwd.googlegroups.com>

On Dec 9, 2:16 am, "sybrandb" <sybra..._at_gmail.com> wrote:
> Bruintje Beer wrote:
> > Hi,
>
> > I am new to oracle. How can I change the timestamp and date format to
> > dd-mm-yyyy hh:mm:ss for timestamp and dd-mm-yyyy for date.
>
> > Thanks
>
> > JohnDates are not stored as a string internally. You can change the display
> format though by using the to_char function.
> select to_char(sysdate, 'dd-mm-yyyyy') from dual;
>
> Doc questions are best avoided here.
> The SQL reference manual athttp://tahiti.oracle.comis your friend.
>
> --
> Sybrand Bakker
> Senior Oracle DBA

John, developer or DBA?

The Application Developers Guide - Fundamentals has a chapter on the Oracle database data types and includes a list of useful date functions and information on how to change the default date format.

See the SQL manual for function documentation like to_char, to_date, and add_months.

See the Reference manual for information on V$NLS_DATABASE_PARAMETERS and NLS_SESSION_PARAMETERS if you are interested in changing the default display format.

Sybrand pointed you to the manuals. Hopefully I have narrowed down where you need to look. Every developer should read the Application Developers Guide - Fundamentals before they start to work with Oracle. Every DBA, the Concepts and DBA Administration Guide before they start.

There is no substitue for reading the manuals. And the manuals need to be re-read with major upgrades.

HTH -- Mark D Powell -- Received on Sat Dec 09 2006 - 17:32:48 CST

Original text of this message

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