Re: Adding Numeric Field to a Date

From: <ramsey84_at_my-deja.com>
Date: Tue, 13 Jul 1999 15:35:10 GMT
Message-ID: <7mfmbd$ltt$1_at_nnrp1.deja.com>


Thanks, James, for the response. I am using "Calculations" within "Edit Sheet" in Discoverer. Forgive me for not seeing it, but I am not finding how to specify the type of variable I want when I create it. It seems to be hidden. How do I specify ENDDATE be created as a DATE field? Any ideas? You are saying it make sense that this will work with the literal values eventhough I don't specify it as a date field for that, right? Thanks, again!
In article <7mdnpk$86$1_at_nnrp1.deja.com>,   James Lorenzen <james_lorenzen_at_allianzlife.com> wrote:
> 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
>
> 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.
>

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Tue Jul 13 1999 - 17:35:10 CEST

Original text of this message