字符串转日期! 请问:字符串 2006-01-01 13:01:58怎么转换为日期类型 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 DateTime dt = DateTime.Parse("2006-01-01 13:01:58"); public static DateTime ToDateTime ( string value) DateTime.Parse("2006-01-01 13:01:58"); DateTime.Parse("有效的日期格式字符串"); DateTime dt = DateTime.Parse("2006-11-01 11:01:18"); 这个没错, 但我在 XML 中用 xmlTextReader.GetElementContentAsDateTime() 读上述 字符串并转化为 DateTime 时出错!再请问: 这个有什么问题? DateTime dt = DateTime.Parse("2006-01-01 13:01:58"); DateTime dt = DateTime.Parse("2006-01-01 13:01:58");或 DateTime dt=Convert.ToDateTime("2006-01-01 13:01:58"); DateTime dateTime=Convert.ToDateTime("2006-01-01 13:01:58");就可以了,楼上已经说了 求教数据库高手(WINFORM) datagridview 的问题 请问在c#与vb.net中,与excel文件的连接字符串怎样写? 提示“未将对象引用设置到对象的实例”(C#),请教原因,谢谢! DataGridView中,我绑定数据(DATASET),为什么设置不了某条记录visiable=false为不可见? 如何做Pocket PC上的程序安装包,在线等待。 求教 附代码求问各位大神WPF的UI问题.. 分布式应用程序? 请教一个小问题 一个线程控制其它线程(SLEEP)的问题 寻求解决方法:错误信息“试图在 OS 加载程序锁内执行托管代码...”
string value
)
但我在 XML 中用 xmlTextReader.GetElementContentAsDateTime() 读上述 字符串
并转化为 DateTime 时出错!再请问: 这个有什么问题?
或 DateTime dt=Convert.ToDateTime("2006-01-01 13:01:58");
就可以了,楼上已经说了