[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Dateadd function error



Jim
Unless defined as a date or converted to date, $parm-end-dt is a string.

In your set-up section, declare you date variable of type: date

begin-setup
    declare-variable
        date   $param.end-tt  $anotherDate
    end-declare
end-setup

Alternatively you could use:
    let $parm-end-dt = datetostr( $parm-end-dt )
or
   let $sunday = dateadd( datetostr( $parm-end-dt ),'DAY',6) 

Andrew

----- Original Message ----- 
From: jim nowlin <jim_nowlin@NAVIGATORS.ORG>
To: <SQR-USERS@list.iex.net>
Sent: Monday, July 02, 2001 7:58 PM
Subject: Dateadd function error


> Brio product and version number:  SQR V4.3.4
> Operating system and version number: True64 (Compaq) 5.0A
> Database name and version number: Oracle 7.3.4.0.0
> 
> This is the first time I tried to use "dateadd". The code I'm using
> follows:
> 
>   let $sunday = dateadd($parm-end-dt,'DAY',6)
> 
> I get the following error in the sqrlog:
> 
> Error on line 118:
>    (SQR 4045) Function or operator 'dateadd' requires date argument.
> 
> Any ideas on what I'm doing wrong?
> 
> If I can get this to work, can I use a negitive number to subtract six
> days?
> 
> Thanks for the help,
> Jim Nowlin
> jim_nowlin@navigators.org