[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



use Declare-variable for local procedure also.

like:

Begin-Procedure Test($From, $Thru)
Declare-variable
   Date $From $Thru
End-Declare

...
...

End-Procedure

Hope it helps.

Gopal




                    "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>


                    05/10/00 14:42
                    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.