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: Date datatype

RE: Date datatype

From: Christian Antognini <Christian.Antognini_at_trivadis.com>
Date: Tue, 5 Apr 2005 19:44:32 +0200
Message-ID: <2CF83791A616BB4DA203FFD13007824A02144346@MSXVS02.trivadis.com>


Hi

>According to the FM, the function doesn't work with
>date field,=20

You are right. Unfortunately 1) I didn't get my memory upgrade yet 2) I = use TIMESTAMP most of the time, therefore I didn't get this error...

>only with timestamp with time zone data type:

Be careful, with a "simple" TIMESTAMP it works as well...

SQL> create table t1 (d date, tz timestamp);

SQL> insert into t1 values (sysdate, sysdate);

SQL> select extract(minute from tz) from t1;

EXTRACT(MINUTEFROMTZ)


                   38


>> 3.. I tried to add a numeric value from another
>> field to a date column and it worked for the
>> date. Is it possible to do the same thing with the time?
>
>Yes. E.g. add 1/24 to add one hour... i.e. you should do some math...
>
>As you said 'If you copy/paste an example it's easier to help' me.

I will never show you how to add 1/24 to a date... otherwise we will = never learn to learn! Instead I give you another hint: the arithmetic = operator to add two values is the character plus, i.e. "+".

HTH
Chris

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Apr 05 2005 - 13:48:23 CDT

Original text of this message

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