I have a file with a column in it and the date is in the format 01JAN2010. I need to convert the date to the format YYYYMM and then add 4 months to it. I found this code PUT(YEAR(nomination_ship_dt),4.)||PUT(MONTH(nomination_ship_dt),Z2.0) AS YEAR_MONTH LENGTH=6 FORMAT=$6. but in working with it I couldn't get it to work. I changed the format=$6 to format=6.0. I also tried removing the Length but I couldn't get it work. Any help is appreciated.
I would add the 4 months then convert. Adding 4 months would be
intnx('month',nomination_ship_dt,4) as new_ship_dt. My sas is down, but if you just need to format the new value, a custom format might be better.