From dgoulet@vicr.com Tue, 03 Jul 2001 13:42:33 -0700 From: dgoulet@vicr.com Date: Tue, 03 Jul 2001 13:42:33 -0700 Subject: Re:help needed in data datatype Message-ID: MIME-Version: 1.0 Content-Type: text/plain Harvinder, If you want time in a date column, you've got to tell Oracle what to put in there, otherwise it assumes 00:00:00. In your statement there is no time therefore none got recorded. So what you need is: insert into dd values(to_date('04-JUL-01 23:59:59','DD-MON-YY HH24:MI:SS'); Another way to look at it is to try: select to_char(to_date('01-JUL-01'),'DD-MON-YY HH24:MI:SS') from dual; Dick Goulet ____________________Reply Separator____________________ Author: Harvinder Singh Date: 7/3/2001 1:13 PM Hi, I have a table with colum defined as date datatype ..for example create table dd(dd date); when we insert into this table like : insert into dd values('04-jul-01'); when we do select as: select to_char(dd,'DD-MON-YYYY HH24:MI:SS') from dd; the result displayed is : TO_CHAR(DD,'DD-MON-Y -------------------------------------- 04-JUL-2002 00:00:00 our application requires time to store as 23:59:59 and not as 00:00:00(midnight).... How can i make a check or apply some rule that whenever someone inserts into this column time always added as 23:59:59........ Thanks Harvinder

Hi,

I have a table with colum defined as date datatype ..for example

create table dd(dd date);

when we insert into this table like :

insert into dd values('04-jul-01');

when we do select as:

select to_char(dd,'DD-MON-YYYY HH24:MI:SS') from dd;

the result displayed is :

TO_CHAR(DD,'DD-MON-Y

--------------------------------------

04-JUL-2002 00:00:00

our application requires time to store as 23:59:59 and not as 00:00:00(midnight)....

How can i make a check or apply some rule that whenever someone inserts into

this column time always added as 23:59:59........

Thanks

Harvinder

-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: dgoulet@vicr.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).