I'm trying to parse a date string in the form dd/mm/yyyy but I keep getting a consistent yet invalid results. What am I doing wrong?
here's the code and it's input
DateTime.ParseExact("23/09/2018","d/m/yyyy",CultureInfo.InvariantCulture)
=>
1/23/18
DateTime.ParseExact("8/10/2018","d/m/yyyy",CultureInfo.InvariantCulture)
=>
1/8/18
DateTime.ParseExact("30/04/2018","d/m/yyyy",CultureInfo.InvariantCulture)
=>
1/30/18
I've tried using CultureInfo.GetCultureInfo("en-UK")
, CultureInfo.GetCultureInfo("en-GH")
but still same results.
I've tried using "dd/mm/yyyy" still same results.
I've also tried qouting the slashed as described here but still same results.