Calculate Variable with iso week number

Discuss RoboTask here
Post Reply
Brad
Posts: 7
Joined: Sat May 01, 2010 5:00 am

Calculate Variable with iso week number

Post by Brad »

I have an application that records data to a text file and the text file is named:  <year>_<iso-week>_randomtext.txt
Robotask can create an email and if i assign the text file as the message body it works to email the contents of the text file to another person
BUT as the text file name changes every week, how can i dynamically create the variable to the text file.  Every week I want to email a different text file.
Something like:   c:\{year}_ISOWEEK({date})_randomtext.exe
 
 
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Calculate Variable with iso week number

Post by Oleg »

Hm-m... You are correct. RoboTask have no algorithm to retrieve ISO week number.
Basic plugin have the function of calculating the number of the week, but it is not corresponding to ISO algorithm (only the week number from 1).

I wrote this problem into our ToDo list. We'll add such functions into next release of RoboTask.
Last edited by Oleg on Sun May 02, 2010 9:22 am, edited 1 time in total.
Brad
Posts: 7
Joined: Sat May 01, 2010 5:00 am

Calculate Variable with iso week number

Post by Brad »

I can work with a 'normal' week number - but where do I find that ?
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Calculate Variable with iso week number

Post by Oleg »

In this case you can use "Evaluate" action with this expression:
DatePart("ww",Date)

It calculates the number of current week.
In this algorithm 1st January is always in 1-st week
and the week begins from Sunday
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Calculate Variable with iso week number

Post by Oleg »

Of course you should download and install Basic plugin here http://www.robotask.com/downloads/BasicForRoboTask.exe
Post Reply