The “String was not recognized as a valid DateTime” error has unexpectedly emerged.
It has been functioning correctly for the past three months, but now this error has surfaced.
I have verified that the input format remains unchanged from before.
Kindly assist me in resolving this issue.
I have used - Datetime.ParseExact(CurrentRow(“Posting Date”).ToString,“dd-MM-yyyy”,system.Globalization.CultureInfo.InvariantCulture).ToString(“ddMMyyyy”)
Step 1: capture the current row to a string variable called ‘yourstr’
Left assign:
yourStr
Right assign:
DateTime.ParseExact(CurrentRow(“Posting Date”).ToString,“dd-MM-yyyy”,system.Globalization.CultureInfo.InvariantCulture).ToString(“ddMMMyyyy”)
Step 2: convert to your desired format
Left assign:
yourStr
Right assign:
Datetime.ParseExact(yourStr,“ddMMMyyyy”,system.Globalization.CultureInfo.InvariantCulture).ToString(“ddMMyyyy”)