Can you explain why are you adding 1-4 days any condition like this?
Hi @shruthi_arali ,
We can use a Random Type variable to do your Randomisation of the number of days.
System.Random type variable, say
Initialise it using an Assign like below :
rndVar = new Random
Next in place of 7, we can call the Random function in the below way :
rndVar.Next(0,5) is used to get a Random number between 0 and 5
Hi @shruthi_arali and @supermanPunch ,
Do give @supermanPunch 's brilliant solution a try, but you might want to tweak it a little like so →
Date.Parse(datetime).AddDays(New Random().Next(1,5)).toString(“MM/dd/yyyy HH:mm:ss”)
you have to start from 1 or else it will return zero.
Also, it isn’t necessary to initialize it in a separate Assign Activity, you can directly do so in the snippet of code.
@ashwin.ashok and @supermanPunch
I tried the logic recommended and Its working for me…
Thank you so much
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.