Created
August 13, 2018 13:31
-
-
Save simonbrowndotje/c2eb9c2ec61ad6ef4dd52c6c78b16524 to your computer and use it in GitHub Desktop.
This file contains 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; | |
namespace Structurizr.Examples | |
{ | |
class GettingStarted | |
{ | |
static void Main() | |
{ | |
DateTime date; | |
DateTime.TryParseExact("2017-10-06", "yyyy-MM-dd", CultureInfo.InvariantCulture, DateTimeStyles.None, out date); | |
Console.WriteLine(date); | |
Console.WriteLine(DateTime.ParseExact("2017-10-06", "yyyy-MM-dd", CultureInfo.InvariantCulture, DateTimeStyles.None)); | |
Console.WriteLine(DateTime.ParseExact("2017-10-06", "yyyy-MM-dd", new CultureInfo("en-US"), DateTimeStyles.None)); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment