Hi everyone,
I’ve been trying to figure this one out for a while now but don’t get it to work. I hope somebody here can help me solve the problem.
I’m trying to convert a string to a DateTime type.
My process starts with the Get Text Activity which saves the text (e.g. “January 2021”) from a website in the variable jDate.
This works out just fine and I can write out a line in the console which prints out “January 2021”
Next, I’d like to convert this string to the DateTime format. I used the assign activity and created a variable called dateInput of the type DateTime for that:
dateInput = DateTime.ParseExact(jDate, “MMMM yyyy”, System.Globalization.CultureInfo.InvariantCulture)
Here I get the error: “Assign: String was not recognized as a valid DateTime.”
I tried the same process without Get text activity and I assigned the variable jDate the value January 2021 and it worked fine. Is it possible that the GetText activity doesn’t save it as a string but a generic value and has therefore to be coverted? If yes, please let me know how to do that.
Does anyone know how to solve this issue?
Cheers Tim