I am trying to convert dd.mm.yyyy to dd/ MMM/ yy using German cultureInfo
For example: 28.12.2020 should become 28/ Dez/ 20
Right now I have the following variables setup:
germanDateTest as string
newDate as string
germanCulture as CultureInfo (Default value = New CultureInfo(“de-DE”))
I am using this for the conversion:
newDate = Datetime.ParseExact(germanDateTest.ToString,“dd.mm.yyyy”,system.Globalization.CultureInfo.InvariantCulture).ToString(“dd/ MMM/ yy”, germanCulture).Replace(".","/")
It doesn’t convert the month correctly for some reasons. It will just show 28/ Jan/ 20 no matter what I entered for the month.
Please let me know if you know what is causing this problem or you know a better way to archive this goal. Thanks!