Re: problem with dates

Agree with Reeza. I would also add, if you have dates with missing information, then you need to define a set of rules to handle missing. For instance if day is missing do you want to populate it with a fixed point, e.g. 01, or will it be missing in the output variable. You then need to code for this. So:

Re: problem with dates

Do you really go through all that to create another text variable that isn't going sort very well?

I would suggest creating the variable as a SAS Date variable and apply the format Date9. Then if I need to do anything with that variable I can get much done but grouping with a different format or change the display by just changing the format at time of display.

I have 2 dataset where where date variable is in simple number. i.e. 20140202 , its not a date format its in number.

After mapping both dataset with the help of combination of variable where date is one of them.

Now i want result output where i want to show date variable in date9. Format.

In simplyfy i want to convert number in date9. Format. Using above mention combination of functions i m getting my result but when ever observation comes where date variable is missing , its throw error.

At the same time i m finding my solution is not standard and realiable.