Page 1 of 1

@dateval does not convert alpha series to a date series

Posted: Wed Mar 25, 2020 5:20 am
by mamo
Dear Eviewers,

I use Eviews 11 Sept 2019 built 64 bit.

With the attached file and applying the code below, I want to generate a new series named "newdate" from the existing alpha-series named "date" with the values "Sat Feb 15 2020", "Sun Feb 16 2020", "Mon Feb 17 2020", ....

But I get only NAs.

Can you help me what the error is?

Best,
mamo

Code: Select all

series newdate=@dateval(date, "Wdy Mon DD yyyy")

Re: @dateval does not convert alpha series to a date series

Posted: Wed Mar 25, 2020 5:59 am
by mamo
I solved the issue, and the solution suggests that there is a bug in the function @datevalue

First removing the three-letter weekday abbreviation at string positions 1-3 from the date string before applying @datevalue:

Code: Select all

series newdate=@dateval(@mid(date,5), "Mon DD yyyy")
yields the expected result.

It seems that the double day specification - the three-letter weekday abbreviation at the beginning and the two-digit-day-of-months at string positions 9-10 - confuses @datevalue.

Prbly sth to consider for future updates of EVIEWS.

Best, mamo

Re: @dateval does not convert alpha series to a date series

Posted: Wed Mar 25, 2020 12:35 pm
by EViews Matt
Hello,

This is indeed a bug, and will be fixed in the next EViews patch.