Pagerestructure

For questions regarding programming in the EViews programming language.

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

Redwing153
Posts: 30
Joined: Sat May 30, 2015 5:10 am

Pagerestructure

Postby Redwing153 » Sun Jun 26, 2016 7:03 am

Hello,

I have this code, which is designed to create a new dated workfile with weekly observations with an end date of today and a start date of 10 years ago

Code: Select all

wfcreate u 1000 pagestruct(freq="w",start=2000,end=@now) pagestruct(start=@now-521)
If I run this on the 26/06/2016, @now returns 25/06/2016.

How can I control the end date (and make it read 26/06/2016)?

Thanks.

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

Re: Pagerestructure

Postby EViews Gareth » Sun Jun 26, 2016 7:52 am

Store the current date into a %variable, then use that variable inside the command

Redwing153
Posts: 30
Joined: Sat May 30, 2015 5:10 am

Re: Pagerestructure

Postby Redwing153 » Sun Jun 26, 2016 8:30 am

What am I doing wrong here? It isn't working for me

Code: Select all

wfcreate u 1000 %a=@datestr(@now,"dd/mm/yyyy") pagestruct(freq="w",start=2000,end=%a pagestruct(start=%a-521)
I'm still getting an end date of 25/06/2016


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests