I have a date in the following iso format:
ISODATE
2017-09-01 10:43:04.000
The format is Stata is: %tcCCYY-NN-DD_HH:MM:SS.sss
I'm trying to extract out the month but haven't been able to make it work.
I tried various forms such as:
gen month=month(ISODATE)
Appreciate some help here. thanks.
Related Posts with How to extract month from an iso date?
-xtevent- Stata module to estimate and visualize linear panel event-study models now available on SSCIt's been a while since I posted anything to Statalist!!! Thanks to Kit Baum, -xtevent- is now avai…
Merge 2 datasets: individual and county level datasetsI need to merge two datasets. One has individual-level data and the other has county-level data. I…
Dummy Variable as Dependent Variable in a Panel RegressionGood Day Everyone! I am doing a panel regression on have a problem in running panel models in Stata…
how to show mean in each year for categorical dataDear researchers, I have a panel dataset for the period from 2012-2020. The dependent variable is c…
Error when use xtcsd (_variable merge already defined)Hi, I have a problem when I use xtcsd. After I run using xtreg depvar indepvar, fe , and then use "x…
Subscribe to:
Post Comments (Atom)
0 Response to How to extract month from an iso date?
Post a Comment