saving workfile under name with today's date (@strnow)

For questions regarding programming in the EViews programming language.

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

evuga
Posts: 7
Joined: Tue Oct 28, 2014 8:06 am

saving workfile under name with today's date (@strnow)

Postby evuga » Fri Oct 16, 2015 6:48 am

I tried to put a command that saves the actual workfile under a name containing today's date, e.g. wf_2015-10-16 and tried it with the @strnow and a string variable. But it returns an error message.

Command:

Code: Select all

%date=@strnow("yyyy-mm-dd")
wfsave(2) wf_%date

Error message is:
Unable to open file \\user.me\wf_"2015-10-16".wf1 in "WFSAVE(2) WF_"2015-10-16"".

What would be the solution or is there another way to save the file under that name?
Many thanks in advance.

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

Re: saving workfile under name with today's date (@strnow)

Postby EViews Gareth » Fri Oct 16, 2015 8:01 am

Code: Select all

%date=@strnow("yyyy-mm-dd")
wfsave(2) wf_{%date}
Follow us on Twitter @IHSEViews

evuga
Posts: 7
Joined: Tue Oct 28, 2014 8:06 am

Re: saving workfile under name with today's date (@strnow)

Postby evuga » Fri Oct 16, 2015 8:32 am

Yes, sure. I somehow lost sight of it. Thanks.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 62 guests