Server Error in '/' Application.

String was not recognized as a valid DateTime.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.FormatException: String was not recognized as a valid DateTime.

Source Error:

Line 52:         if (code == "010301" || code == "010302" || code == "010304")
Line 53:         {
Line 54:             dr_up = BLL.Article.Article.getPackArtice2(int.Parse(dr.ExtGetValue("sortno", "0")), code, int.Parse(Convert.ToDateTime(dr.ExtGetValue("addtime")).ToString("yyyy")), dr.ExtGetValue("id")).ExtGetRow(0);
Line 55:             dr_down = BLL.Article.Article.getNextArtice2(int.Parse(dr.ExtGetValue("sortno", "0")), code, int.Parse(Convert.ToDateTime(dr.ExtGetValue("addtime")).ToString("yyyy")), dr.ExtGetValue("id")).ExtGetRow(0);
Line 56:         }

Source File: d:\wwwcn_new\jingxin\Detail.aspx.cs    Line: 54

Stack Trace:

[FormatException: String was not recognized as a valid DateTime.]
   System.DateTime.Parse(String s, IFormatProvider provider) +6365762
   System.Convert.ToDateTime(String value) +62
   Detail.Page_Load(Object sender, EventArgs e) in d:\wwwcn_new\jingxin\Detail.aspx.cs:54
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.UI.Control.LoadRecursive() +71
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3048

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1