[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: help?



You have $quarter as the date to string variable not $doc_date. so your
$doc_date is not in the right format.
It should look something like:

h.DOC_DT &doc_date

let $doc_date = datetostr($doc_date, 'MM/DD')

If $doc_date >= '10/01' and $doc_date <= '12/31'
let $quarter = '1'
end-if

If $doc_date >= '01/01' and $doc_date <= '04/30'
let $quarter = '2'
end-if

If $doc_date >= '05/01' and $doc_date <= '06/30'
let $quater = '3'
end-if

If $doc_date >= '07/01' and $doc_date <= '10/31'
let $quater = '4'
end-If

At 10:50 AM 7/26/02 -0400, you wrote:
>Hey Ramzi,
>thanks for replying. That was not the prob. It doesn't like my comparison
>using <= or >= is there any other way I can compare the dates.
>
>$doc_date >= '10/01' and $doc_date <= '12/31'
>            let $quarter = '1'
>         else If $doc_date >= '01/01' and $doc_date <= '04/30'
>            let $quarter = '2'
>         end-if
>         else If $doc_date >= '05/01' and $doc_date <= '06/30'
>            let $quater = '3'
>
>
>thanks