String was not recognized as a valid DateTime.c#中

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/25 11:23:18
String was not recognized as a valid DateTime.c#中
x) .)KW(O,V/Q(JMOˬJMQ$*%d($d%+?ٱ&HD}`-v6[tg3?ٻYWӵӟYdǦ{<]c³^N_l{z9e\ѓ@t>|V XXi]mlڶO>]ɮ659略dd``o`o`i VK.D~qAb(

String was not recognized as a valid DateTime.c#中
String was not recognized as a valid DateTime.
c#中

String was not recognized as a valid DateTime.c#中
就是你把字符串转换成时问格式出错,字符串不是有效的时间格式嘛
解决办法就是你把时间格式写对就好了
如Convert.ToDateTime("2008/01/02");
Convert.ToDateTime("2008-01-02");