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 85:         string s_tourName=row["tournament_name"].ToString();
Line 86:         string s_startDate = Convert.ToDateTime(row["start_date"].ToString()).ToString("dd.MM.yyyy");
Line 87:         string s_endDate = Convert.ToDateTime(row["end_date"].ToString()).ToString("dd.MM.yyyy");
Line 88:         string s_playerLimit = row["player_limit"].ToString();
Line 89:         bool isChartAvailable = false;

Source File: c:\inetpub\wwwroot\bfnc.billiardport.com\page_tour_brackets.aspx.cs    Line: 87

Stack Trace:


[FormatException: String was not recognized as a valid DateTime.]
   System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) +14020703
   System.Convert.ToDateTime(String value) +85
   _main.GenerateCharts4Tour(String s_tourId) in c:\inetpub\wwwroot\bfnc.billiardport.com\page_tour_brackets.aspx.cs:87
   _main.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\bfnc.billiardport.com\page_tour_brackets.aspx.cs:69
   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.4110.0