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?
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.