STRDATE: Stata module to replace string date variables with numeric date variables with the same names
strdate replaces a list of string date variables with a list of Stata numeric date variables having the same names, the same positions in the data set order, and the same variable labels (if present). The conversion is carried out using the Stata date() function. strdate is used when the user has input a generic ASCII data file produced by a spreadsheet, using the infile command, and the data file includes character-format date variables. The infile command converts these to string variables. The strdate command converts these to numeric date variables with the same names, dropping the old string variables. This saves the user the trouble of converting the variables one by one, inventing new names, and worrying about the order of variables in the data. The program strdate is written in Stata Version 7.
In order to set up a list of libraries that you have access to,
you must first login
or sign up.
Then set up a personal list of libraries from your profile page by
clicking on your user name at the top right of any screen.