The format statement applies the given format to the specified variable for display purposes only, i.e. the underlying value does not change.
data example1 ;
Date = '02AUG2016'd ; /* stored as a SAS date, i.e. a number */
Date2 = '31AUG2016'd ;
format Date monyy7. Date2 yymmddn8. ;
run...