I have a dataset that has a character variable called date with values
July 7, 2004
June 8,1998
December 14, 2018
How can I convert this to a SAS date without a whole bunch of substrings?
data have;
input word_date $ 20.;
num_date =input(word_date, anydtdte32.);
format num_date worddate.;
cards;
July 7, 2004
June 8,1998
December 14, 2018
;;;;
run;
Please remember to try and search your questions before posting as well.
@Ani7 wrote:
I have a dataset that has a character variable called date with values
July 7, 2004
June 8,1998
December 14, 2018
How can I convert this to a SAS date without a whole bunch of substrings?
data have;
input word_date $ 20.;
num_date =input(word_date, anydtdte32.);
format num_date worddate.;
cards;
July 7, 2004
June 8,1998
December 14, 2018
;;;;
run;
Please remember to try and search your questions before posting as well.
@Ani7 wrote:
I have a dataset that has a character variable called date with values
July 7, 2004
June 8,1998
December 14, 2018
How can I convert this to a SAS date without a whole bunch of substrings?
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: