Date Calculation Problem

Discuss RoboTask here
Post Reply
waldo
Posts: 56
Joined: Fri Sep 24, 2004 3:36 am

Date Calculation Problem

Post 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.
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Date Calculation Problem

Post 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.
waldo
Posts: 56
Joined: Fri Sep 24, 2004 3:36 am

Date Calculation Problem

Post 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.
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Date Calculation Problem

Post 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.
waldo
Posts: 56
Joined: Fri Sep 24, 2004 3:36 am

Date Calculation Problem

Post by waldo »

Oleg,
Thanks...this is a menu that I had not used previously..again, THANK YOU!!! 
Post Reply