Hello,
I am attempting to turn a string value "2020-2021" into a date value. Nothing I am doing is actually working, its only returning 4.490e+21 as the output. I have attached the code below:
gen date2=date("2020-2021", "YY")
format date2 %ty
display date2
I understand that the issue may lie in STATA using a reference date in 1960 for the date() function. I have no idea how to mediate this.
Related Posts with Working with dates
How to select the best functional form for a gravity model using panel data with non-stationary observationsI am trying to measure the impact of Geographical Indications in international trade with a gravity …
Predicting residuals by industry and yearHi, I am running the following model bys industry year: reg y x predict e, residuals Here, if I …
Heat Plot Code: * Example generated by -dataex-. To install: ssc install dataex clear input str10 CODICE byte…
issues with nested logitDear forum, I'm an economics PhD student playing around with the new Discrete Choice features in St…
Difference in differences and the bi-directional modelDear researchers, I have two questions, please. I have unbalanced panel data for a set of firms. I…
Subscribe to:
Post Comments (Atom)
0 Response to Working with dates
Post a Comment