Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: help needed in data datatype

RE: help needed in data datatype

From: Yadav, Shailesh <NDASY3_at_labor.state.ny.us>
Date: Tue, 03 Jul 2001 13:57:46 -0700
Message-ID: <F001.00340B42.20010703135609@fatcity.com>

Harvinder,  

  You never inserted the time component of the date so how can you get it from the database. Either explicitly insert time component or if possible use a la sysdate/now (datetime function of your tool) when inserting a date.  

Shailesh

-----Original Message-----
Sent: Tuesday, July 03, 2001 5:13 PM
To: Multiple recipients of list ORACLE-L

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: Yadav, Shailesh
  INET: NDASY3_at_labor.state.ny.us

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_at_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). Received on Tue Jul 03 2001 - 15:57:46 CDT

Original text of this message

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