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 40: %>
Line 41: 
Line 42: <h3><% Response.Write(strCat); %>: <% Response.Write( (DateTime.Parse(strCounterDate) - DateTime.Now).Days.ToString("#,##0")  ); %> Days out</h3>
Line 43: 				
Line 44: 					

Source File: c:\Inetpub\wwwroot\ATR\WWW\Portals\_default\Skins\ATR-one\placementcontrols\feature_col\articles_by_cat.aspx    Line: 42

Stack Trace:


[FormatException: String was not recognized as a valid DateTime.]
   System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) +2271986
   System.DateTime.Parse(String s) +22
   ASP.portals__default_skins_atr_one_placementcontrols_feature_col_articles_by_cat_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\Inetpub\wwwroot\ATR\WWW\Portals\_default\Skins\ATR-one\placementcontrols\feature_col\articles_by_cat.aspx:42
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +2068235
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
   System.Web.UI.Page.Render(HtmlTextWriter writer) +26
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1896


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210