Home Unanswered Active Tags New Question

string was not recognized as a valid DateTime

Hi, i encountered an error when deploying my application, that uses DayPilot Lite on the remote server

this is the error:

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:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[FormatException: String was not recognized as a valid DateTime.]
System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) +2835862
System.Convert.ToDateTime(String value) +98
DayPilot.Web.Ui.DayPilotCalendar.PerformDataBinding(IEnumerable retrievedData) +308
DayPilot.Web.Ui.DayPilotCalendar.OnDataSourceViewSelectCallback(IEnumerable retrievedData) +47
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31
DayPilot.Web.Ui.DayPilotCalendar.PerformSelect() +98
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.BaseDataBoundControl.OnPreRender(EventArgs e) +22
System.Web.UI.Control.PreRenderRecursiveInternal() +80
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

my dates come from an oracle database and are stored as timestamps

does anyone know how to solve it?

i've tried the link in the post above me, but that solution doesn't work for me

thx in advance

Asked by DieterC 2 years ago.
Replies

I found the error

there was a row stored in my table with an empty date value, so the conversion to datetime couldn't be completed because of that empty string.

Answer posted by DieterC 2 years ago.

Thanks for posting the solution!

Comment posted by Dan Letecky 2 years ago.
New Reply
This reply is
Your name (optional):

DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java