Server Error in '/' Application.

Conversion from string "" to type 'Date' is not valid.

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.InvalidCastException: Conversion from string "" to type 'Date' is not valid.

Source Error:


Line 341:
Line 342:                        ltlTitlePropostaRecrut.Text = sm_content.Content.GetFieldValue("title")
Line 343:                        ltlAnuncioData.Text = "<b>" & Global.Resources.MyResource.AnuncioData & "</b>: " & Common.FormataData(CDate(sm_content.Content.GetFieldValue("date"))) & "<br />"
Line 344:                        If Not sm_content Is Nothing And Not sm_content.Content Is Nothing And sm_content.Content.GetFieldValue("referencia") <> "" Then
Line 345:                            ltlAnuncioRef.Visible = True

Source File: D:\_SITES\tecnilab.pt - www\_components\contents\content.ascx.vb    Line: 343

Stack Trace:


[InvalidCastException: Conversion from string "" to type 'Date' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToDate(String Value) +174
   _components_content.Page_Load(Object sender, EventArgs e) in D:\_SITES\tecnilab.pt - www\_components\contents\content.ascx.vb:343
   System.Web.UI.Control.OnLoad(EventArgs e) +79
   System.Web.UI.Control.LoadRecursive() +130
   System.Web.UI.Control.LoadRecursive() +200
   System.Web.UI.Control.LoadRecursive() +200
   System.Web.UI.Control.LoadRecursive() +200
   System.Web.UI.Control.LoadRecursive() +200
   System.Web.UI.Control.LoadRecursive() +200
   System.Web.UI.Control.LoadRecursive() +200
   System.Web.UI.Control.LoadRecursive() +200
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2852


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