Problem with date formatting

I tried make next edition of this by having datatable which has “Opening date” and which I loop through and change every row opening date to this format, but I got error “Assign: String was not recognized as a valid DateTime.”