extract year of each observation from series
Posted: Thu Mar 04, 2021 7:06 am
I have a series with date entries. The data is "unstructured" and therefore not sorted by this date series. How do I extract the year and/or the month of each observation? As a result I would like to get self-updating series, containing the year and month of the observation in one or two separate series, so that I can input them as dummy variables into equations. The dates are in the format "yyyy-mm-dd".