[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Dates in local procedures
Declare a date to use within the local procedure:
BEGIN-PROCEDURE Local($Date)
Declare-Variable
Date $Date
End-Declare
END-PROCEDURE
John M. Doel
Consultant
PeopleSoft Consulting USA
Phone: (877) 339-2982
"Ed Kelly"
<ed_kelly@HOTM To: SQR-USERS@list.iex.net
AIL.COM> cc:
Sent by: Subject: Dates in local procedures
"Discussion of
SQR, Brio
Technology's
database
reporting
language"
<SQR-USERS@lis
t.iex.net>
10/05/00 03:42
PM
Please respond
to sqr-users
How do you get SQR to treat a local variable as a date? It looks like
dates
passed to a local variable are converted to string. Here's a code
fragments:
Begin-Setup
Declare-variable
Date $Fromdate $Thrudate
End-Declare
End-Setup
. . . . . .
Begin-Procedure Main
Let $FromDate = StrToDate('Jan 01 1995','Mon dd, YYYY')
Let $ThruDate = StrToDate('Aug 01 1995','Mon dd, YYYY')
If $FromDate > $ThruDate
Show 'Test1: From date is greater than Thru date' ! Does not display
End-if
Do Test ($Fromdate, $ThruDate)
End-Procedure
Begin-Procedure Test($From, $Thru)
If $FromDate > $ThruDate
Show 'Test2: From date is greater than Thru date' ! Does display
End-if
End-Procedure
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.