Don’t you know how to use the Stata date type? If you don’t know how, come and learn how to use the Stata date type with the editor. I hope that through this tutorial, you can help everyone better understand the Stata software. .
First, open the dataset file. sysusesp500.dta
Click edit data (editor) to view the detailed data. You can see that the value of the date variable is date type data, and the display method is the default display format in stata.
Select date in the variable list in the upper right corner, and click the... button to the right of format in the attribute list.
The format setting box pops up. You can see that stata has a variety of built-in date format display methods. Select one of them and click OK.
Looking at the data again, it has become the format we want.
Enter "30042014" in the empty cell of date. Even if we do not enter the separator, stata can still recognize it correctly.
The above is the method of using the Stata date type shared by the editor. Friends in need can take a look.