morinia
asked on
Is there a way to check a date field in SAS for a missing date
I have two date fields in SAS DATEA and DATEB. Both fields may be empty of both fields may have a date.
Is there a way to check of DATEA is missing and DATEB is not missing to Set FIELDC = 'Y'?
I am having a problem checking a date field for a missing value.
Is there a way to check of DATEA is missing and DATEB is not missing to Set FIELDC = 'Y'?
I am having a problem checking a date field for a missing value.
ASKER
I am sorry, I formatted the dates so when I did a proc contents they are defined as:
Char len 10
I formatted the dates as MMDDYY10.
Char len 10
I formatted the dates as MMDDYY10.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
My problem does not seem to be with the missing data. It is when I have a date in the field
i.e. 12/10/2011 that I am getting an error message
'12'/10/2011' Invalid numeric data
i.e. 12/10/2011 that I am getting an error message
'12'/10/2011' Invalid numeric data
could you please post your code and log?
DATEA = . And DATEB <> .
What's the error you are getting? What does your code look like now?