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 64:             //lblSchoolName.Text = reader["Team2"].ToString();
Line 65:             this.sportID = reader["SportID"].ToString();
Line 66:             this.conDate = System.Convert.ToDateTime(reader["conDate"].ToString()).ToLongDateString();
Line 67:             this.conTime = reader["ConTime"].ToString();
Line 68:             this.conLocation = reader["ConLocation"].ToString();

Source File: D:\www\isn\idahosports.com\schools\ReportScores.aspx.cs    Line: 66

Stack Trace:


[FormatException: String was not recognized as a valid DateTime.]
   System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) +14276559
   System.Convert.ToDateTime(String value) +85
   Schools_ReportScores.GetScheduleInfo() in D:\www\isn\idahosports.com\schools\ReportScores.aspx.cs:66
   Schools_ReportScores.Page_Load(Object sender, EventArgs e) in D:\www\isn\idahosports.com\schools\ReportScores.aspx.cs:32
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


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