摘要:
最近需要把“20121010”转换为“2012-10-10”格式,直接用Convert.ToDateTime("20121010"),系统报错“未被识别的DateTime类型”。解决方法:一、DateTime.ParseExactstring str = "20121010";IFormatProvider ifp = new CultureInfo("zh-CN", true); DateTime dt = DateTime.ParseExact(str, "yyyyMMdd", ifp); MessageBox 阅读全文
posted @ 2012-10-25 17:29
nextsoft
阅读(22691)
评论(0)
推荐(2)

浙公网安备 33010602011771号