将日期从20101231转换为2010年1月31日 [英] convert date from 20101231 to 31/janaurary/2010

查看:103
本文介绍了将日期从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.


看看

这篇关于将日期从20101231转换为2010年1月31日的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆