@GMP1978 wrote:
I want to create a new variable and return a 1 when Date1 is greater than Date2 and have it formatted as a numeric.
First, don't put quotes around a value you want as numeric. Quotes define character values.
You can also try
(date1 gt Date2) as Date_compare
SAS will return 1 for true and 0 for false for simple logical comparisons though you may need to think about what you want if either of the two variables is missing
And why do you want comma8.2 format for a value range of 0 and 1???
... View more