求教,C#中时间转换的问题!请进!
求教各位,时间的转换,我想把时间为“1999年9 月9 日”字符串转换成“1999-09-09”格式怎么做呢?
[解决办法]
DateTime.ParseExact后再DateTime.ToString
[解决办法]
更正一下:
- C# code
string s = "1999年9月9日"; string r = DateTime.ParseExact(s, "yyyy年M月d日", null).ToString("yyyy-MM-dd"); Response.Write(r);