Page 1 of 1

Date Calculation Problem

Posted: Mon May 14, 2007 7:10 am
by waldo
I need to schedule a weekly report to run via RoboTask.  I have Robotask input the date parameters to the reporting software as follows:
{MonthNo}/{IncDays(-7)}/{Year}{TAB}{Date}{TAB}{DELAY 500}
Everything works fine provided that date in the month is 8 or greater [i.e., May 8th for May].  For the first seven days of May, it seems that robotask cannot interpret that seven days prior to the May date is actually an April date. 
For example on May 4th..I really need enter April 27th as the lower reporting parameter. Robotask produces an error. Once I reach May 8th---everything works fine as robotask misses 7 from May 8th and arrives at May 1st.
Is there a way that I can write a formula,  so that Robotask can correctly calculate a date in the previous month when the date in the current month is 7 or less [i.e., Correctly calculate April 27 when it is May 4th]?  THANKS.

Date Calculation Problem

Posted: Tue May 15, 2007 12:32 am
by Oleg
Try to use the following construction:

{MonthIncDays(-7)}\{IncDays(-7)}/{Year}{TAB}{Date}{TAB}{DELA Y 500}

{MonthNo} returns only current month, but you need to calculate MonthNo 7 days ago. MonthIncDays does this.

Date Calculation Problem

Posted: Tue May 15, 2007 5:17 am
by waldo
Oleg,
Thanks for your advice..I will try this.  How can I find all the variables available to me {i.e., how did you know about MonthIncDays??}.  Is there a master listing of Window variables that I can secure?  THANKS.

Date Calculation Problem

Posted: Wed May 16, 2007 8:45 am
by Oleg
Just use RoboTask's menu "Options | Variables" and look at the complete list of accessible variables. Each variable has a small comment.
Also System variables are separated by categories.

Date Calculation Problem

Posted: Wed May 16, 2007 9:21 am
by waldo
Oleg,
Thanks...this is a menu that I had not used previously..again, THANK YOU!!!