将日期从20101231转换为2010年1月31日

将日期从20101231转换为2010年1月31日

问题描述:

如何使用c#在asp.net中将日期从yyyy/mm/ddd转换为dd/mm/yyyy

(例如)
我有一个像20101231这样的日期(我从机器上得到了),我想像这样转换它
2010年1月31日

帮助:〜

how convert date from yyyy/mm/ddd to dd/mm/yyyy in asp.net with c#

(eg)
I have a date like 20101231 in this format(i got it from machine) i want to convert it like this
31/janaurary/2010

Help :~

看看 DateTime.ParseExact方法 [ ^ ]特别是上面带有使用自定义说明符解析日期和时间"的注释.
Have a look at the DateTime.ParseExact Method[^] specifically the one with the comment of "Parse date and time with custom specifier" above it.


看看