Dear Stata users,
I have a date variable formatted using %tmCCYYMon. However, I have identified a subset of observations for which years are wrong: they should be equal to 2018 instead of 2019. I can easily identify which observation is wrong by using a "flag" dummy.
Is there a way to directly modify the variable using -- replace date = .... if flag==1 --
This may sound like a simple question, but I cannot find an answer anywhere.
Thank you in advance,
Jack
Related Posts with Directly modifying part of a date variable
Non linear equation in STATAHello, I am looking for the code to solve for t(p): e^t + t = p for values p=1 and p = 4. Thanks…
Test for Autocorrelation and Time lagged variablesHello i ve got following questions.. 1. Is there a test for autocorrelation that fits with pooled …
HELP: generating distinct ids for "repeated" numbers of distinct groups I have distinct groups (case-control) but the matchedIDs seem to repeat itself. I want each distinc…
Labeling order numbersexample data ORDER ID The passing time 61785B020027AD01 1 61785B020027AD01 0 61785B020027AD…
How to create multiple tables in single word file Using Outreg2 (three different Panel)Hi, I want to create three separate tables for three panels in a word file. I know how to use append…
Subscribe to:
Post Comments (Atom)
0 Response to Directly modifying part of a date variable
Post a Comment