Forum Discussion

alejandrovargas's avatar
alejandrovargas
Occasional Contributor
9 years ago

How to use +days option to avoid an specific day.

Hi all,   I have some tests that I need to execute almost everyday, tests always make a search 3 days in the future.    The problem is that I always have to change the date manually to 3 days in ...
  • alejandrovargas's avatar
    9 years ago

    Hi,

     

    Thanks for your answer. Yesterday we could find the solution for my problem, I will explain because it could be useful for other people:

     

    Command: ${=import java.text.SimpleDateFormat; new SimpleDateFormat('yyyy-MM-dd').format(new Date() + 31*5 + (int)(Math.random()*10))}

    This exemple uses current day + 31*5 + random value between 0 and 9

     

    In the file attached you can see where the code were pasted. This window was opened with double-click in the project.