Convert mm/dd/yy to MonthName DayNumber, YearNumber in SAS -
i want able convert entire column of dates way. example, 01/01/2017 january 1, 2017. realize there convoluted way of doing not entirely sure how i'd approach logically. also, there happen sas format this? thanks.
there happen format can use. here worked example using test data:
data test; input datestring $; datalines; 01/01/2017 ; run;
using input converts string value sas date, , put function used create character variable holding representation looking for:
data test2; set test; date_as_date = input(datestring,ddmmyy10.); date_formatted = put(date_as_date,worddate20.); run;
the number 20 used describe length long enough hold full value, using lower number may result in truncation, e.g.
date_formatted = put(date_as_date,worddate3.); put date_formatted=; dateformatted=jan
Comments
Post a Comment