DateTime.ToString giving incorrect result

I think the new DateTime.ToString is giving incorrect result on Windows

Dim d as Date = new Date

MessageBox d.ShortDate // Gives 10/11/2019 - Correct

Dim d2 as DateTime = DateTime.Now

MessageBox d2.ToString(Locale.Current, DateTime.FormatStyles.Short, DateTime.FormatStyles.None) // Gives 10/11/19 - Incorrect

My system short date format in control panel on the Windows is: M/d/yyyy

Edit: Tossed in bug report also: 57837 - DateTime.ToString gives incorrect result

Just ran into this myself with 2020r2.1, but on a Mac.
I am using German locale and DateTime.FormatStyles.Medium and got this result

grafik

With FormatStyles.Medium, I get at least 2 digits for the year but never the full year, except with Long and Full which are too verbose.
By system settings, output should be ok.

Time to move this to the ignored tickets thread, I guess.

1 Like

Unfortunately, I gave up on the localization issue and I am building them on my own.