I've encountered a problem when trying to parse a data from the DB.
The data I have for example is: 2019-04-19T00:00:00.000Z
I'm trying to get it to the format of dd/MM/yyyy
but I'm encountering the error:
String was not recognized as a valid DateTime.
Here's my code block
string x = DateTime.ParseExact("2019-04-19T00:00:00.000Z","'\"'yyyy-MM-dd'T'HH:mm:ss.fff'Z\"'", CultureInfo.InvariantCulture).ToString("dd/MM/yyyy");
Am I specifying the wrong format? Or are there any other ways of doings this?