Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Morning everybody,
Simple one for you I have a variable vWKEND that I what to make numeric.
LET vWKEND = peek('WEDAT', 0, 'CurrentDate');
I need to make vWKEND numeric....not too sure about the syntax to do this.
I tried this one with no luck:
Num('$(vWKEND)') as NumWkend;
Thanks
Or LET vWkNo = Num(peek('WKNO', 0, 'CurrentDate'));
what Format is WEDAT?
have you tried: week($(vWKEND))
Here is part of my script. I thought I would try creating another variable to pass throughout the script, but for some reason it does not like my syntax....something really simple I know.
CurrentDate:
LOAD FISPD,
FISYR,
[Billing Date],
WEDAT,
WKNO
FROM
where [Billing Date] = '$(vToday)';
LET vFisYr = peek('FISYR', 0, 'CurrentDate');
LET vFisPd = peek('FISPD', 0, 'CurrentDate');
LET vWkNo = peek('WKNO', 0, 'CurrentDate');
LET vWKEND = peek('WEDAT', 0, 'CurrentDate');
Num(Date($(vWKEND), 'YYYY-MM-DD')) AS vNumWkend;
DROP TABLE CurrentDate;
Any of the below statement should work.
LET vWKEND = Evaluate(peek('WEDAT', 0, 'CurrentDate'));
LET vWKEND = Num(peek('WEDAT', 0, 'CurrentDate'));
try
Num(Date('$(vWKEND)', 'YYYY-MM-DD')) AS vNumWkend;
what Format is WEDAT?
Or LET vWkNo = Num(peek('WKNO', 0, 'CurrentDate'));
I am getting an error unknown statement
Thanks.....
sorry, I didnot read exactly
you cannot assign a variable to other variable using as!
you should use
Let vNumWkend=Num(Date('$(vWKEND)', 'YYYY-MM-DD'))
or you directly use
Let vNumWkend=Num(Date(peek('WEDAT', 0, 'CurrentDate'), 'YYYY-MM-DD'))