GT - LT WITH DATES?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

GT - LT WITH DATES?

Raffe, Sydelle, SSA
I recall being able to use operators like gt and lt with vars in date format. But, nothing happens. Can someone set me straight? Thanks.

Sydelle Raffe, Alameda County Social Services Agency
Information Services Division
e:mail:  [hidden email]
phone: 510-271-9174     fax: 510-271-9107
If you have a request for information, please submit an ODM request form at:  https://alamedasocialservices.org/staff/support_services/statistics_and_reports/odm/index.cfm
Reply | Threaded
Open this post in threaded view
|

Re: GT - LT WITH DATES?

John Norton
You may have to use a date function as part of the logical evaluation, something like this:
 
DO IF (birthdate GT (DATE.MDY(12,13,2000))).
COMPUTE x = 1.
ELSE IF (birthdate LT (DATE.MDY(12,12,2000))).
COMPUTE x = 0.
END IF.
 
Of course, we could simplify the command to be:
 
COMPUTE x = (birthdate GT (DATE.MDY(12,13,2000))).
 
.. and that should do the same thing.
 
HTH
 
John Norton
Biostatistician
Oncology Institute
Loyola University Medical Center
 
(708) 327-3095
[hidden email]
 
"Absence of evidence
      is not evidence of absence"


>>> "Raffe, Sydelle, SSA" <[hidden email]> 12/13/2006 4:12:36 PM >>>

I recall being able to use operators like gt and lt with vars in date format. But, nothing happens. Can someone set me straight? Thanks.

Sydelle Raffe, Alameda County Social Services Agency
Information Services Division
e:mail:  [hidden email]
phone: 510-271-9174     fax: 510-271-9107
If you have a request for information, please submit an ODM request form at:  https://alamedasocialservices.org/staff/support_services/statistics_and_reports/odm/index.cfm