I am facing difficulty in parsing a DateTime with the structure of time zone:
I am trying to parse it this way:
string Date_ = "2021-02-21T00:00:00+00:00"; var Date = DateTime.ParseExact(Date_ , "yyyy-MM-ddThh:mm:ssZ", System.Globalization.CultureInfo.InvariantCulture); Console.WriteLine(Day);
But I am not sure how exactly one provides timezone string while parsing. What could be the issue?