[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: how to compare dates
Why not use the DATETOSTR function:
let $quarter = datetostr($docdate,'Q')
Using the Q mask will return the quarter of the year (1 thru 4) that the
$docdate belongs in
|--------+------------------------>
| | Andalib Yussuf|
| | <andalib.yussu|
| | f@AMS.COM> |
| | |
| | 07/25/2002 |
| | 03:00 PM |
| | Please respond|
| | to sqr-users |
| | |
|--------+------------------------>
>--------------------------------------------------------|
| |
| To: SQR-USERS@list.iex.net |
| cc: (bcc: Rick Creel/IT/Aon Consulting) |
| Subject: Re: how to compare dates |
>--------------------------------------------------------|
Thanks for the code sample but I am comparing four quarters.
If docdate is between date 1 and date 2 let quarter = 1
else if
" "
so on
I was wondering if there is a reserved word I could use or something. I
already tried using the code below and it didn't work. Hope you can help.
Thanks for the quick reply I appreciate it.
($doc_date >= '01/01' AND
$doc_date <= '04/30'
let $quarter = 1)