Re: DAte format

From: Kenneth C Stahl <BluesSax_at_Unforgettable.com>
Date: Thu, 22 Jul 1999 07:46:53 -0400
Message-ID: <379704AC.7BF47AA3_at_Unforgettable.com>


Sunder wrote:

> Hello All,
>
> Can I specify the date format of a column at table creation time. I want
> to specify the date format as yyyymmdd for a column of data type DATE.
>
> Any help is appreciated
> Sunder

You have a basic misunderstanding about how databases work in general and how a DATE column is stored.

If you want dates to be displayed in yyyymmdd format you can either specify that mask whenever you SELECT a date column or else you can do the following:

alter session set nls_date_format = 'yyyymmdd'

and that will change it for your entire session. If you want this date format to be used globally for all sessions then you need to change put the nls_date_format parameter in your initxxx.ora. However, unless you are the only person using the database I'd suggest that you not do this since it may break the code of other users.

Ken Received on Thu Jul 22 1999 - 13:46:53 CEST

Original text of this message