I have a data set that has variables assign_date1 to assign_date50. They are date variables but in character format E.g sample values - 2021-05-24 ; 2021-04-15 I am trying to convert them to date using arrays and do loop. The date format that I want the values to be - 24MAY2021 ; 15APR2021. Below is the code that I am using Data test; Set dataset ; /*data set sample name*: /* Existing date variables in character form*/ Array assign_date_array(50) $ 10 Assign_date1-Assign_date50; /*Variables that would store the converted date variables*/ Array new_date_array(50) New_date1-New_date50; Do I =1 to 50; New_date_array[i] = input(assign_date_array[i] , yymmdd10.); Format new_date_array[i] date9.; End; Drop I; Run; Code runs when I exclude the format line. But as soon as I execute with format line I get error 85-232- Expecting a format name The code runs fine when I run with individual Column name I.e not with do loop and array
... View more