Hi Everyone,
I've been dealing with this somewhat special type of data format and wanted to convert it to Stata date format.
Below is the sub-samples of the variable.
In many cases, the date formats are represented as yyyymmdd (numerical).
I could always search how to convert those types easily.
But I couldn't find any good solutions to deal with the type in data example.
I tried combining several commands by myself but it kept giving me missing values, guessing that those commands were completely wrong.
Could anyone please help me out how to convert this date variable into Stata date format?
(This variable is a web-scraped variable and I could get year and month but not day values)
I've been dealing with this somewhat special type of data format and wanted to convert it to Stata date format.
Below is the sub-samples of the variable.
In many cases, the date formats are represented as yyyymmdd (numerical).
I could always search how to convert those types easily.
But I couldn't find any good solutions to deal with the type in data example.
I tried combining several commands by myself but it kept giving me missing values, guessing that those commands were completely wrong.
Could anyone please help me out how to convert this date variable into Stata date format?
(This variable is a web-scraped variable and I could get year and month but not day values)
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str13 join_date "2016September" "2016January" "2015November" "2015October" "2016October" "2016November" "2016December" "2016February" "2017January" "2017February" "2017March" "2017April" "2017May" "2016March" "2017June" "2017July" "2018April" "2018February" "2017November" "2015December" "2018January" "2016April" "2017August" "2017September" "2017December" "2017October" "2018May" "2018March" "2016May" "2018June" "2018July" "2018August" "2016June" "2018September" "2018October" "2018November" "2018December" "2019January" "2019February" "2016July" "2019March" "2019April" "2019May" "2019June" "2019July" "2016August" "2019August" "2019September" "2019October" "2019November" "2019December" "2020January" "2020February" "2020March" "2020April" "2020May" end
Comment