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: Date and Time

Re: Date and Time

From: Peter Laursen <ptl_at_edbgruppen.dk>
Date: 11 Feb 2000 12:45:18 GMT
Message-ID: <01bf748d$b16cede0$2c289a0a@apollo>


Sonia Gillespie <sonia_gillespie_at_lagan.com> skrev i artiklen <950271473.4514.0.nnrp-08.9e9859ae_at_news.demon.co.uk>...
> I would like to be able to display time (hh:mi:ss) only in a column in a
> table, and am a bit unsure about how to do this. The column type is
date,
> and I am using a stored procedure to enter the data into the table, the
type
> of the data being entered again being date.
>

Hi Sonia

When you store data in a column of type date, oracle stores the date including date, month, year, hours etc in its own internal format. When you select data and wants to display it, then you can format the date -
eg using select to_char(datefield, 'HH:MI:SS') from table, leaving out date month and year information.

You cannot store only hh:mi:ss in a column of type date. You would have to use a type varchar2 and store the formatted date as text.

Peter Laursen Received on Fri Feb 11 2000 - 06:45:18 CST

Original text of this message

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