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 51:                 LitDet.Text = rec["Fld_NewsBrifEn"].ToString();
Line 52: 
Line 53:                 LitDate.Text = Convert.ToDateTime(rec["Fld_Date"].ToString()).ToShortDateString();
Line 54: 
Line 55:                 ref1.HRef = "OneNews.aspx?Id=" + rec["Fld_NewsId"].ToString();

Source File: d:\Inetpub\vhosts\web-hosting-jordan.com\eurolitkrant.com\News.aspx.cs    Line: 53

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
   SubPageEn.Rep_News_ItemDataBound(Object sender, RepeaterItemEventArgs e) in d:\Inetpub\vhosts\web-hosting-jordan.com\eurolitkrant.com\News.aspx.cs:53
   System.Web.UI.WebControls.Repeater.OnItemDataBound(RepeaterItemEventArgs e) +139
   System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +193
   System.Web.UI.WebControls.Repeater.AddDataItemsIntoItemsArray(IEnumerable dataSource, Boolean useDataSource) +291
   System.Web.UI.WebControls.Repeater.PostGetDataAction(IEnumerable dataSource) +109
   System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +81
   SubPageEn.Page_Load(Object sender, EventArgs e) in d:\Inetpub\vhosts\web-hosting-jordan.com\eurolitkrant.com\News.aspx.cs:21
   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.4682.0