Page 1 of 1

Series of formatted date strings

Posted: Wed May 16, 2018 8:12 am
by lgehrig
Hi EViews Pros

I have a huge confusion with date series.
I would like to have a series of DATES that I can add to my

Code: Select all

write() xx.csv DATES EXPORTVARIABLES

But instead of the date numbers (1999Q1, since I'm at quarterly frequency) I would like to control the date format, hence I cannot simply use the "dates" argument in the write function.

Code: Select all

series dates=@date


supposedly gives me date numbers, but I cannot change the date format on the entire series using @datestr.

Code: Select all

@strdate("dd.mm.yyyy")


doesn't do what I'd like to get either.

Can anyone push me in the right direction here? Thanks a lot!

Re: Series of formatted date strings

Posted: Wed May 16, 2018 8:23 am
by EViews Gareth
Create an alpha series in the workfile containing the string representation of the date you want to use.

Code: Select all

alpha mydates = @datestr(@date, "YYYY[Q]Q")

Re: Series of formatted date strings

Posted: Wed May 16, 2018 11:36 pm
by lgehrig
Aha! That makes sense. Thanks, Gareth!