Page 1 of 1

Calculate Variable with iso week number

Posted: Sat May 01, 2010 5:06 am
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
 
 

Calculate Variable with iso week number

Posted: Sun May 02, 2010 12:38 am
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.

Calculate Variable with iso week number

Posted: Sun May 02, 2010 4:47 am
by Brad
I can work with a 'normal' week number - but where do I find that ?

Calculate Variable with iso week number

Posted: Sun May 02, 2010 5:19 am
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

Calculate Variable with iso week number

Posted: Sun May 02, 2010 5:20 am
by Oleg
Of course you should download and install Basic plugin here http://www.robotask.com/downloads/BasicForRoboTask.exe