Test if value is a date-literal, or not. Use the input-function, with the "??" option, and see if a missing-value is returned or not. Use the "ANY" informats, to sequentially test for valid date and date-time literal-values. If a missing value is returned, assume the value is a SAS-date or SAS-datetime. Test if the value is strictly a SAS-date, as follows: if(^('01JAN1960'd<=SasDate<=today())) Use a similar test, to check for valid date-time values.
... View more