Hi. In the code you posted you only format the date variables in the date values you put to the log. The date variables in the data set will not be formatted. Use a Format Statement like this
data test;
date1='01jan18'd;
date2='31dec18'd;
format date1 date2 ddmmyy8.;
run;
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss. Register now and lock in 2025 pricing—just $495!