I suggest working with the SAS DATE numeric-type variables for a more straightforward technique, and also so you can use INTNX, for deriving date values and date-strings.
In a DATA step, use the PUT function with a SAS DATE type variable, if you need to assign a character-type variable, for some purpose:
data _null_;
mytoday = "&sysdate9"d;
format mytoday date9. ;
today_yymmdd = put( mytoday,yymmdd6.);
putlog _all_;
run;
The SAS support
http://support.sas.com/ website provides SAS-hosted documentation and supplemental technica/conference papers on this topic - use the website SEARCH or a Google advanced search, adding the site:sas.com parmeter to limit your search to the SAS.COM site.
Scott Barry
SBBWorks, Inc.
SAS DOC - Working with Dates in the SAS System:
http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/a001304321.htm
Using SAS® Dates and Times – A Tutorial
Jonas V. Bilenas, JP Morgan Chase, Wilmington, DE
http://www2.sas.com/proceedings/forum2007/226-2007.pdf
TS-668
SAS Dates, Times, and Interval Functions
Definitions and Explanations
SAS Dates, Times, and Datetimes:
http://support.sas.com/techsup/technote/ts668.pdf