Move File: String was not recognized as a valid DateTime

I try to rename a pdf file using the name , the surname and the birth date.
For that I use the move file activity.

Ienmatches(0).Value represents the name
Ienmatches2(0).Value represents the surname
DateTime.Parse(ienmatches5(0).value).tostring(“MM.dd.yyyy”) represents the date of birth

it works for the 1st rename :

but not for the 2nd

Do you know why??

Thanks in advance for your help.
Rgds,
Maic

can you try this instead

DateTime.ParseExact(ienmatches5(0).value, "dd/MM/yyyy", nothing).toString("MM.dd.yyyy")
image

the error may be because its trying to parse the date as MM/dd/yyyy but your date is 16/11/1970 (dd/MM/yyyy format)

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.