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 405:    {
Line 406:        string s_date = date.ToString();
Line 407:        DateTime dt = Convert.ToDateTime(date);
Line 408:        s_date = dt.ToShortDateString().ToString();
Line 409:        return s_date;

Source File: d:\inetpub\wwwroot\FAITHNETWORK_VAULT\ABOUNDINGLIFEREDESIGN\message.aspx.cs    Line: 407

Stack Trace:


[FormatException: String was not recognized as a valid DateTime.]
   System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) +14545182
   System.Convert.ToDateTime(String value) +80
   _Default.getepisodeDate(String date) in d:\inetpub\wwwroot\FAITHNETWORK_VAULT\ABOUNDINGLIFEREDESIGN\message.aspx.cs:407
   ASP.message_aspx.__DataBind__control4(Object sender, EventArgs e) in d:\inetpub\wwwroot\FAITHNETWORK_VAULT\ABOUNDINGLIFEREDESIGN\message.aspx:50
   System.Web.UI.Control.OnDataBinding(EventArgs e) +98
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +174
   System.Web.UI.Control.DataBindChildren() +246
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +191
   System.Web.UI.WebControls.DataList.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +173
   System.Web.UI.WebControls.DataList.CreateControlHierarchy(Boolean useDataSource) +858
   System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) +88
   _Default.Page_Load(Object sender, EventArgs e) in d:\inetpub\wwwroot\FAITHNETWORK_VAULT\ABOUNDINGLIFEREDESIGN\message.aspx.cs:101
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


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