search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

string was not recognized as a valid DateTime

Asked by DieterC
15 years ago.

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

Answer posted by DieterC
15 years ago.

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.

Comment posted by Dan Letecky
15 years ago.

Thanks for posting the solution!

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.