[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Dates in local procedures
- Subject: Dates in local procedures
- From: Ed Kelly <ed_kelly@HOTMAIL.COM>
- Date: Thu, 5 Oct 2000 22:42:14 GMT
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.