extract year of each observation from series

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

centroid
Posts: 20
Joined: Fri Feb 05, 2021 4:46 am

extract year of each observation from series

Postby centroid » 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".

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13307
Joined: Tue Sep 16, 2008 5:38 pm

Re: extract year of each observation from series

Postby EViews Gareth » Thu Mar 04, 2021 8:52 am

A combination of the @datepart and, possibly, @datestr and @dateval functions.
Follow us on Twitter @IHSEViews


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 15 guests