I have an Excel file where I have a date in format ”02.10.2015” (dd.MM.yyyy) as a string.
I need to input that date to a website but I also need to add some dates to that date.
For example, first I need to input the actual date ”12.10.2015” and second I want input a day after it like ”13.10.2015”.
I use get row item to get the first date from an excel, save the output to ”mydate” variable and then I use it straight in type into activity. After that I want to have a day after that so I use the assign activity to change date from a string to DateTime like this:
mydate = DateTime.ParseExact(mydate, “dd.MM.yyyy”, System.Globalization.CultureInfo.InvariantCulture).ToString
secondDate = DateTime.ParseExact(mydate, “dd.MM.yyyy”, System.Globalization.CultureInfo.InvariantCulture).AddDays(1).ToString
But it doesn’t work and it gives me this error sign : ” Assign: String was not recognized as a valid DateTime. ”
Both of the variable types are GenericValue, but when I change them into DateTime -type the error ”Option Strict On disallows implicit conversions from ‘String’ to ‘Date’" occurs……
Any tips or ideas why this doesn’t work? Or if there are some better ways to do it, I would be more than grateful to hear Thank you already!