I still can't believe this is not working after reading the examples and answers on here.
I have a numeric variable with say the value 20160101.
This needs to be 2016-01-01.
My code... input(put(numvar, Z8.), yymmdd10.) as datevar
OK, the result is 20454
What is more frustrating is when I try this in two different steps. The put(numvar, Z8.) works, but then trying to covert to date ALWAYS ends up back in numeric form.