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
Esttab: Combining summary statistics and correlation tableHello Stata experts, I try to export my summary statistics, the correlation table and my regression…
Partialing out multiple regressors (Frisch-Waugh Lovell Theorem) and reghdfe commandDear All, I want to run a generalized diff-in-diff regression that exploits time variation in state…
Grouping DataI am conducting a cross-sectional study of UK FTSE 100 firms. I want to group companies by industry …
Maximum Likelihood EstimationHey I am supposed to estimate the three parameters (i.e. lambda0, lambda1 and delta) in the followi…
how can I generate a dummy variable based on another dummy variable?Hi all, my data pretty much looks like the following Code: Year company var1 1999 CompanyA 0 200…
Subscribe to:
Post Comments (Atom)
0 Response to Working with dates
Post a Comment