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

RE: [sqr-users] brain dead?



As I recall, this is an old "feature" of SQR regarding the late day of the 
month. There should be many archived postings.

Basically, when you compare dates in SQR the last day of one month is NOT less 
than the first of the next month - how's that for logic. This is NOT a problem 
when the date coparisons are part of your SQL Select Statement.

The workaround is to convert dates to YYYYMMDD strings or numbers and then 
compare the strings/numbers.



-----Original Message-----
From: sqr-users-bounces+jbeller=lbisoftware.com@sqrug.org
[mailto:sqr-users-bounces+jbeller=lbisoftware.com@sqrug.org]On Behalf Of
Timm Buchanan
Sent: Tuesday, June 22, 2004 6:05 PM
To: sqr-users@sqrug.org
Subject: [sqr-users] brain dead?


OK, so spent the weekend in NYC for a Bachelor Party and probably
killed a few brain cells, but this is getting a little crazy. Please
help me prove my sanity....


begin-procedure report

let $date1 = '08-NOV-2003'
let $date2 = '08-JAN-2004'
let $fromdate = '01-JAN-2004'
let $thrudate = '31-JAN-2004'

end-procedure



In my mind:

$date1 is < $fromdate 
$date2 is > $fromdate 
$date2 is < $thrudate

However, running this procedure with some tests show this:

$date1 08-NOV-2003
$date2 08-JAN-2004
$fromdate 01-JAN-2004
$thrudate 31-JAN-2004
date 1 >= fromdate
date 2 >= fromdate
date 1 <= thrudate
date 2 <= thrudate

What am I missing? I have been writing SQR code for many years now...I
think I killed the SQR brain cells this weekend.....

Thanks...

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users