Error: String '' was not recognized as a valid DateTime

Could you try below script?

DateTime.ParseExact("06/22/2023", "MM/dd/yyyy", CultureInfo.InvariantCulture)