04-15-2016 08:03 AM
I am trying to find a way to convert a date into a like for like character string to I can merge in data using the date as a variable.
Where date2 is the datepart(date) formatted using monyy5.
I would like to make a variable date3 that is a character replica of date2 as I don't want to deal with days in the merge.
Does anyone know an easy way to do this?
04-15-2016 08:22 AM
A reasonable way:
length date3 $ 3;
date3 = put(date2, monyy5.);
Because of the LENGTH statement, there is only room to store the first 3 characters.