开发者

how to change culture date format in c#?

how to change culture date format开发者_Go百科 in c#


Are you asking for this?

Formatting Date and Time for a Specific Culture


If you need to you can change the culture for the current thread so you don't have to do it for each call.

Thread.CurrentThread.CurrentCulture = New CultureInfo("th-TH", False)

More information here: http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.currentuiculture%28VS.71%29.aspx


For example in DateTimePicker you can use CustomFormat property to add the format you want(independent on culture). or see @gcores's answer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜