[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: SQR Datediff?
- Subject: Re: SQR Datediff?
- From: "Rao, Sam" <Sam_Rao@AFCC.COM>
- Date: Tue, 24 Aug 1999 15:03:52 -0500
DATEDIFF requires data arguments, therefore unless $asoftoday and $effdt
are declared as data variables using the DECLARE-VARIABLE command in the
SETUP section, this will not work.
You can use Peoplesoft's DATEMATH procedures (in datemath.sqc) to accomplish
the same on character variables that contain date representations.
-Sam Rao
> -----Original Message-----
> From: Buchanan, Timothy [SMTP:buchanan@BIPERF.COM]
> Sent: Tuesday, August 24, 1999 2:37 PM
> To: Multiple recipients of list SQR-USERS
> Subject: SQR Datediff?
>
> Anyone get datediff function to work in SQR in an Oracle environment? I am
> trying to find the difference in days between 2 dates using the following
> code in a SQL statement:
>
> LET #dif = DATEDIFF($asoftoday, $effdt, 'DAY')
>
> I get the error: Function or operator 'datediff' requires date argument.
>
> Using debug, I can see that $asoftoday and $effdt are equal to the
> following:
>
> ASOFTODAY = 24-AUG-1999
> EFFDATE = 01-JUL-1998
>
> Hmm..sure look like dates to me. I even tried to use STRTODATE on each
> variable, but it still gives me the same error. Any help?? Thanks.
>
> Timm