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
Nested logit with invariant regressorI am trying to use nested logit specification for estimating school choice of households. The first …
Panel data modelHi, I have a panel dataset whereT=10 and N=77 and found the problem of heteroscedasticity, autocorre…
Extreme values in upper/lower bound bands not in original dataI want to create a graph with upper/lower bound bands - using this code (similar to that used here U…
Margins from a mixed model with a log-transformed outcomeI run a mixed model of a log-transformed outcome using ‘mixed’ (and the dfmethod(kroger) option with…
optimizeHi All, I have a big dataset (2432rows with 6 variables) looks like below. I would like to minimize …
Subscribe to:
Post Comments (Atom)
0 Response to Working with dates
Post a Comment