data _null_;
x = datetime(); *** THIS IS THE DATETIME VALUE ***;
y = datepart(x);*** THIS IS THE DATE PORTION ***;
put x= y=;
format x worddate32. y yymmn6.;*** NOTICE THE FORMAT FOR YYYYMM ***;
run;
Now that you understand the theory here is the shorter version.
What version of SAS are you using? I tried this on versions 6, 8 & 9 and it works with all of them. Perhaps, you can contact SAS tech support for why you can't access this format.
Klaz
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.