WFCREATE File X Days through Today

For questions regarding programming in the EViews programming language.

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

kcaron
Posts: 85
Joined: Wed Mar 04, 2015 11:46 am

WFCREATE File X Days through Today

Postby kcaron » Sat Jan 08, 2022 1:09 pm

I'm trying to write a program that starts by creating a WF with a 5 day week periodicity that has the start date as 5 years ago from today (-1825 days) and an end date as the current date.

Can't figure out how to do this. I know I need to use WFCREATE, and I know I can use @now as for either the start or date, but I can't figure out how to code the start date...

Can someone help?

Most grateful.

K

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

Re: WFCREATE File X Days through Today

Postby EViews Gareth » Sat Jan 08, 2022 5:51 pm

Code: Select all

%start = @datestr(@dateadd(@now, -5, "YY"), "YYYY-MM-DD")
wfcreate d5 {%start} @now
Follow us on Twitter @IHSEViews

kcaron
Posts: 85
Joined: Wed Mar 04, 2015 11:46 am

Re: WFCREATE File X Days through Today

Postby kcaron » Mon Jan 10, 2022 2:20 pm

Works perfectly!!!
Thank you, Gareth!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 18 guests