Re: Adding Numeric Field to a Date
Date: Mon, 12 Jul 1999 21:47:36 GMT
Message-ID: <7mdnpk$86$1_at_nnrp1.deja.com>
[Quoted] Whart is the definietion of enddate? If it is date, the math should work. If it is number, then the error you are seeing is the result.
You may add or subtract a number to / from a date resulting in a date. You may subract one date from another resulting in a number. Oracle will casting from one datatype to another. Your examples with literals show this.
HTH
James
[Quoted] In article <7mdlea$v6g$1_at_nnrp1.deja.com>,
ramsey84_at_my-deja.com wrote:
> I am trying to create a new variable (ENDDATE)
> which contains the value of two added fields. A
> field called DAYS (a numeric field ranging from 1
> to 90) and a field called STARTDATE (dd-mmm-
> yyyy). I am using Discoverer and trying to use
> the Calculation area. When I try to do the
> following:
>
> ENDDATE = STARTDATE + DAYS
>
> I get this error: "One of the function arguments
> has an incorrect datatype: +"
>
> A test: ENDDATE = STARTDATE + 30 works fine.
> And test: ENDDATE = 01/01/99 + DAYS works
> fine...any thoughts on what I am missing here?
> TIA
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Mon Jul 12 1999 - 23:47:36 CEST