Last active
October 26, 2022 18:19
-
-
Save jskeet/ae767e23814ef16e8adc5cbabc1d51ae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Globalization; | |
string text = "2020-10-14T13:11:51Z"; | |
var dt = DateTime.ParseExact(text, "yyyy'-'MM'-'dd'T'hh':'mm':'ss'Z'", CultureInfo.InvariantCulture); | |
Console.WriteLine(dt); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment