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?
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.