Monday, August 9, 2010

overwriting DateTime format of UICulture in C#.net

in c# by default when the UI culture is changed then for every UI language there is a format

for example for

en-US is MM/dd/yyyy
de-DE is dd.MM.yyyy

so if you UIculture is changed to de-DE then the datatime format will also change to dd.MM.yyyy

if you want to change datetime format for de-DE to MM/dd/yyyy then try to set it

culture.DateTimeFormat.ShortDatePattern = "MM/dd/yyyy";

No comments:

Post a Comment