ASP.NET Application is displaying american date formats

后端 未结 2 785
长情又很酷
长情又很酷 2021-01-22 04:56

One of my development applications has today started displaying American formatted short dates where I am expecting British formatting.

The dates are being rend

2条回答
  •  滥情空心
    2021-01-22 05:21

    From MSDN

    The value of the current DateTime object is formatted using the pattern defined by the DateTimeFormatInfo.ShortDatePattern property associated with the current thread culture. The return value is identical to the value returned by specifying the "d" standard DateTime format string with the ToString(String) method.

    Have you tried changing the culture for the current thread? This can be set on a per page basis as well - http://msdn.microsoft.com/en-us/library/bz9tc508%28v=vs.85%29.aspx.

提交回复
热议问题