How to use Stata date type-Stata tutorial

Time: 2020-10-22Source: Huajun Software TutorialAuthor: Shaobing

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

The use of date types in stata

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.

The use of date types 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 use of date types in stata

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.

The use of date types in stata

Looking at the data again, it has become the format we want.

The use of date types in stata

Enter "30042014" in the empty cell of date. Even if we do not enter the separator, stata can still recognize it correctly.

The use of date types in stata
The use of date types in stata

The above is the method of using the Stata date type shared by the editor. Friends in need can take a look.

Related articles更多>>

Popular recommendations