string and date

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

loulouviews
Posts: 60
Joined: Wed Mar 11, 2015 2:19 am

string and date

Postby loulouviews » Fri Nov 20, 2015 7:55 am

Hi !
I'm struggling to understand how string and date are working in EViews.
For instance, I would like to use @otod to define the first date of sample
I wrote

Code: Select all

smpl @otod(23) %date_end
EViews says that @otod(23) is an illegal date.

Following help, I've tested

Code: Select all

%date=@otod(1) smpl %date %date+1
EViews says that %date is an illegal date


I've also tried :

Code: Select all

%date=@otod(1) smpl {%date} {%date}+1
But Eviews says that %date is not a correct string or date.

How to deal with date and string ? When does EViews consider a string to be a valid date ?

Any help would be grateful, many thanks.

Loulouviews

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

Re: string and date

Postby EViews Gareth » Fri Nov 20, 2015 8:40 am

Your last syntax is correct, and works:

Code: Select all

create m 1990 2020 %date = @otod(1) smpl {%date} {%date}+1


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests