Hi; I'm new to Macro Scheduler and having trouble with complex expressions.
I need to get the coming Sunday's date:
This works: where result is DOW=5
Let>var={7 - %result%}
Let>var={%var% + 1}
VBEVal>DateAdd("d", %var%, Date),nextsunday
MessageModal>%nextsunday%
However, the complex expr does not:
Let>var={7 - %result% + 1}
Am I missing something?
Thanks in advance
Help with complex Calc
Moderators: Dorian (MJT support), JRL
Works for me...
Are you stepping through using F8 and the Watch List in the editor to watch the values of your variables?
Code: Select all
VBSTART
VBEND
Let>result=5
//This works: where result is DOW=5
//Let>var={7 - %result%}
Let>var={7 - %result% + 1}
//Let>var={%var% + 1}
VBEVal>DateAdd("d", %var%, Date),nextsunday
MessageModal>%nextsunday%
-
- Newbie
- Posts: 15
- Joined: Wed Dec 19, 2007 9:16 pm
Thanks
Not sure what happened; you're right it works...