Delay time Variable

can we set the delay time using variable in delay activity.
I have delay time in string variable how to set that variable to the delay time duration property.

1 Like

Hi,
yes .
Create a VarDelay of type system.timespan=β€œβ€;
then pass in the delay property.
Reference

PS: just make sure the format of string.

I have delay time in .csv sheet .
get the value using this code dtconfig.rows(0).item(0).tostring and assigned to string variable.
if I pass the variable to delay activity I am getting error .
Can you please tell me how to do this?

Hi,
You need to convert string to timespan.
Use TimeSpan.Parse(str) to convert to the string.
Reference

6 Likes

Thank you its working .

Hello ddpadil
I definitely learned a variable delay duration.
Thank you!!!:+1: