I have a date time column named ProjectLastUpdate
which has values such as 2/22/2020 11:29:52 PM
& 1/29/2020 12:00:00 AM
..
I wrote the following code:
DateTime.ParseExact(projectLastUpdate.ToString(), "M'/'d'/'yyyy' 'H':'m':'s", CultureInfo.InvariantCulture).ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'")
to convert the date to the ISO standard, but I am getting this exception:
String was not recognized as a valid DateTime