Error: String was not recognized as a valid DateTime

D

database

I AM FACING A PROBLEM WHEN I ACCESS ONE OF THE PAGES. IT USED TO WORK
BEFORE BUT AFTER RESTARTING THE APPLICATION SEVER IT GIVES THE FOLLOWING
ERROR.

- Server Error

--------------------------------------------------------------------------------

The string was not recognized as a valid DateTime. There is a unknown
word starting at index 20.

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.

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: The string was not recognized as a valid DateTime.
There is a unknown word starting at index 20.]

System.DateTimeParse.Lex(Int32 dps, __DTString str, DateTimeToken dtok,
DateTimeRawInfo raw, DateTimeResult result, DateTimeFormatInfo& dtfi)
+1658
System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi,
DateTimeStyles styles) +334
System.DateTime.Parse(String s, IFormatProvider provider,
DateTimeStyles styles) +30
System.DateTime.Parse(String s, IFormatProvider provider) +11
System.Convert.ToDateTime(String value, IFormatProvider provider) +61
WebDateTime.clsWebDateTime.set_Text(String value)
WebDateTime.clsWebDateTime.set_Value(String value)
System.Web.UI.Contro

-
*
i tried to change the regional setting and restart the server but the
problem still there.
i changed it to dd/mm/yyyy and hh:mm:ss tt as before.

please advise me as i need the solution for urgent.*
 
H

Hans Kesting

I AM FACING A PROBLEM WHEN I ACCESS ONE OF THE PAGES. IT USED TO WORK
BEFORE BUT AFTER RESTARTING THE APPLICATION SEVER IT GIVES THE FOLLOWING
ERROR.

- Server Error

It might help if you show what that string was and how you were trying
to convert it to a DateTime. Also, if it's from a database: what is the
columntype?

Hans Kesting
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top