Using a SAS date constant along with the %SYSFUNC and PUTN functions, you can format a macro variable with any valid SAS date format, for example:
%let day='15feb2010'd;
%put %sysfunc(putn(&day,mmddyy.));
Results in:
2/15/10
Similarly, a datetime constant can be represented with a valid SAS datetime format, for example:
%let day='15feb2010:01:03:00'dt;
%put %sysfunc(putn(&day,datetime.));
Results in:
15FEB10:01:03:00