Skip to content

Instantly share code, notes, and snippets.

@simonbrowndotje
Created August 13, 2018 13:31
Show Gist options
  • Save simonbrowndotje/c2eb9c2ec61ad6ef4dd52c6c78b16524 to your computer and use it in GitHub Desktop.
Save simonbrowndotje/c2eb9c2ec61ad6ef4dd52c6c78b16524 to your computer and use it in GitHub Desktop.
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