what i need is to be able to add days to the start date variable so that can do something until you reach the end date with the string type variable or manage to pass the parameter in the workflow transforming the variable to datetime … can anyone help?
That’s right, I have two date string variables and I need to add days on the start date to do something until I reach the end date, I tried to convert using DateTime.Parse, but no syntax I use allows me to use AddDays with the string type variable , I changed the variable to the DateTime type, but when I pass the argument also the option strict error, in neither case can I find the correct solution
As I can see your syntax when you used DateTime parse, you were also using toString at the end which again results in a string.
Try removing the .toString at the end and assign to in_dateFinal as u did. In the second argument of the date time parse please change format to dd/MM/yyyy as suggested by @ppr.
in_dateFinal should be of type datetime and then you can use add days function to it.
The formula given by @ppr should work perfectly for you. You were on the right track, but you added .ToString after parsing it to a datetime (which means you had a string, converted to date, then right back to string). You need to use the .addDays() method while it is a datetime variable before converting it back to a string
Perfect, now it worked perfectly … can I use the same logic to remove the / (Barra) from the date? I pass the date to save the file and managed to change it to DateTime so I can’t use Replace, I’m trying to fit it in the same logic