Indeed you are correct that I am doing two different things. However, what I was aiming at was how the same date format, i.e. %startdate+1 (or "1970Q1"+1), is handled differently by the two commands smpl and wfcreate. When used in smpl it is understood and accepted, but in wfcreate it is not. To me, this seems an inconsistency.
Moreover, moving the date manipulation in the third code from my last post down to the wfcreate line also causes the program to break down.
Code: Select all
%startdate="1970Q1"
%enddate="2000Q4"
WfCreate q @datestr(@dateadd(@dateval(%startdate,"YYYY[Q]Q"),+1,"Q"),"YYYY[Q]Q") %enddate
IMHO there should not be any difference between how EViews handles a variable which has been declared to contain a value and how EViews handles that same value if entered directly.
One small consolation is that this odd behavior at least seems to be consistent. Replacing %startdate+1 in the second code from my last post with @datestr(@dateadd(@dateval(%startdate,"YYYY[Q]Q"),+1,"Q"),"YYYY[Q]Q"), as per the code below, also causes the program to break down.
Code: Select all
%startdate="1970Q1"
%enddate="2000Q4"
wfcreate q %startdate %enddate
smpl @datestr(@dateadd(@dateval(%startdate,"YYYY[Q]Q"),+1,"Q"),"YYYY[Q]Q") %enddate