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: Implicit Date conversion problem

Re: Implicit Date conversion problem

From: <Reginald.W.Bailey_at_jpmorgan.com>
Date: Tue, 29 Oct 2002 09:23:41 -0800
Message-ID: <F001.004F6834.20021029092341@fatcity.com>

Raj:

The date column has a timestamp value as well. By using the TRUNC function, you are getting all dates regardless of the time value (i.e. 12:01 AM, etc.) . When dealing with DATE datatypes it is always a good practice to use the TRUNC function on the columns to prevent the time of day portion of the date from being considered in the query. You can also make the TRUNC function part of a constraint or trigger, or create a general trigger, to ensure that only the date is placed in the column, and if a time is inserted, then it will be uniform time of , say 12:00AM.

RWB
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author:
  INET: Reginald.W.Bailey_at_jpmorgan.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
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 Oct 29 2002 - 11:23:41 CST

Original text of this message

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