I am trying to parse the following date : 7.92016 which represents September 7th, 2016, using .NET standard functions (DateTime.Parse/TryParse).
So I did the following (with no success as it raises an Invalid Format exception) :
DateTime date;
DateTime.TryParseExact("7.92016", "d.Myyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out date);
What bothers me is that is it totally possible to determine where the month ends as the year is specified with "yyyy". So the standard library should be able to manage this.
Of course I could split the string manually for example, but is there a cleaner solution to manage this situation ?
Thanks a lot for your help !