Hi:
You might want to investigate the INPUT function. For example, if your text field was called CHARSTR, then you could create a numeric variable from the character field by using the INPUT statement:
[pre]
newdate = input(charstr,yymmdd8.);
[/pre]
In this instance, (inside a DATA step program), the new variable NEWDATE would be numeric, would be internally stored as the number of days since Jan 1, 1960, and could be formatted with any of the SAS date formats.
You could then do comparisons or test conditions using NEWDATE like this:
[pre]
if year(newdate) = 2007 . . .
or
if newdate lt '01Jan2008'd . . .
or
if year(newdate - 180) = 2007 . . .
[/pre]
cynthia
ps...there have been a lot of previous forum postings on the conversion of character dates to SAS date values. A search of the forum, might get you some more code examples.