I want to copy a date of a specific excel column for each row and paste it into another column (“Fälligkeit”).
As a next step the date format has to be changed from “yyyyMMdd” to “dd.MM.yyyy”. And this last step is currently not working even though it works if I use hard-coded dates instead of a variable.
So for now my workflow looks like this:
Assign - 1:
Faelligkeit_alt_str = row(0).ToString --> row(0) is where the actual date (“yyyyMMdd”) comes from
Assign - 2:
Faelligkeit_neu_str = DateTime.ParseExact(Faelligkeit_alt_str.ToString(),“yyyyMMdd”,Globalization.CultureInfo.InvariantCulture).ToString(“dd.MM.yyyy”)
But each time I run this process, I receive following error message:
The point is, when I now change “Assign - 1” to a hard-coded date with the correct format (e.g. “20181225”) the conversion (to “25.12.2018”) is working.
So I have no clue why it does not work for a variable…
Can someone please help?