Link to home
Start Free TrialLog in
Avatar of morinia
moriniaFlag for United States of America

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.
Avatar of Aloysius Low
Aloysius Low
Flag of Singapore image

Your condition should look like:
DATEA = . And DATEB <> .

What's the error you are getting? What does your code look like now?
Avatar of morinia

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.
ASKER CERTIFIED SOLUTION
Avatar of Aloysius Low
Aloysius Low
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of morinia

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
could you please post your code and log?