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: Advice on date column?

Re: Advice on date column?

From: Mike Morgan <mmorgan1_at_mail.tds.net>
Date: 1997/08/03
Message-ID: <01bca054$1c942860$4306f6cc@madison.tdsnet.com>#1/1

Bruce,
I would recommend converting to a date field using something like TO_DATE(column_name,'RRMMDD') Check out the RR format mask in the SQL Reference manual. Having the column as a DATE allows for date arithmetic. Sorting is not a problem either.
Mike Morgan



Bruce Bristol <bbristol_at_ix.netcom.com> wrote in article
> I'm going to be adding, removing and possibly changing some columns on
> our tables. This affords me the opportunity to add century to a column
> that we currently have a yymmdd date stored in.
>
> The column's type is number(6).
>
> The data we'll always receive from our customer will be in the yymmdd
> format, even on/after 2000.
>
> For sorting purposes, I can increase the column to a number(8) and add
> the century in our programs, or perhaps an insert trigger.
>
> Should I do this, or just change the column type to 'date'? If I do
> change the column type to date, how do I make sure that programs can
> access it by yymmdd or even yyyymmdd?
>
> If access can still be by yymmdd, will oracle think 000101 is 1900 or
> 2000?
Received on Sun Aug 03 1997 - 00:00:00 CDT

Original text of this message

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