05-04-2016 09:50 AM
I have a sas variable which is only populated with a date in a certain circumstances (for example when a customer misses a payment) otherwise it is missing. Similar to every other date in this dataset (all these dont have missing values though) I wanted it in the below format:
picture MyMSdt other='%0Y-%0m-%0d %0H:%0M:%0S' (datatype=datetime);
When I use the format function to allocate my created format to this date all the observations with missing values are populated with ERROR. The variables which are populated show the results I want. How do I stop the missing ones showing ERROR?
I hope this makes sense.
Need further help from the community? Please ask a new question.