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.]
However, as I said, the page is used to work. But after restating the application server due to a low memory; this page stop to be displayed
because of the error above. All I have is the stack trace.
I believe that the problem in the server data time configuration.
in the page that i am trying to dispaly has no datetime entry. but what i found in the log that there is only an insert statmet that include the date and time.
SELECT SQ.NEXTVAL FROM dual
INSERT INTO AD_AUDIT_RECORDS ( ACTION_ID,RECORD_ID,FORM_ID,USER_ID,AT_DATE,AT_TIME,AT_ACTION,AT_KEY )VALUES(3871,256,18,1,TO_DATE('03/01/2006','dd/mm/yyyy'),'11:44 AM','View','USER_ID = 700001' )
You can change the time to military time (for the database since you said you're not displaying anything) by changing the date/time format string to "t" for just the hours and minutes (e.g., "20:13" for 8:13 PM) and "T" for the hours, minutes, and seconds
(e.g., "20:13:54" for 8:13:54 PM).
I don't know that this SQL query is actually the problem because it's not even using your time's timestamp (hh:mm:ss tt, which would be "03:04:01 AM" and "04:33:21 PM" [I showed both to point out the leading zeros and the fact that it uses 01 - 12 hours
instead of 0 - 23 hours]), which I noticed because the query does not use have the seconds portion of your timestamp. I'd guess the timestamp being used is "hh:mm tt" or maybe just "h:m tt" -- there are no leading zeros in the supplied time to be able to
tell which is used.
database
0 Points
5 Posts
Error: The string was not recognized as a valid DateTime. There is a unknown word starting at ind...
Dec 22, 2006 07:34 PM|LINK
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.
pickyh3d
Star
9696 Points
1955 Posts
Re: Error: The string was not recognized as a valid DateTime. There is a unknown word starting at...
Dec 23, 2006 04:49 AM|LINK
database
0 Points
5 Posts
Re: Error: The string was not recognized as a valid DateTime. There is a unknown word starting at...
Dec 23, 2006 10:56 AM|LINK
Actually, I do not have the access to the code.
However, as I said, the page is used to work. But after restating the application server due to a low memory; this page stop to be displayed because of the error above. All I have is the stack trace.
I believe that the problem in the server data time configuration.
pickyh3d
Star
9696 Points
1955 Posts
Re: Error: The string was not recognized as a valid DateTime. There is a unknown word starting at...
Dec 23, 2006 05:15 PM|LINK
database
0 Points
5 Posts
Re: Error: The string was not recognized as a valid DateTime. There is a unknown word starting at...
Dec 24, 2006 05:26 AM|LINK
<globalization requestEncoding="utf-8" responseEncoding="utf-8"/> this line from web.config
and the sting format that is used is dd/mm/yyyy
database
0 Points
5 Posts
Re: Error: The string was not recognized as a valid DateTime. There is a unknown word starting at...
Dec 31, 2006 08:45 PM|LINK
Any idea regarding this issue??
pickyh3d
Star
9696 Points
1955 Posts
Re: Error: The string was not recognized as a valid DateTime. There is a unknown word starting at...
Jan 01, 2007 01:45 AM|LINK
database
0 Points
5 Posts
Re: Error: The string was not recognized as a valid DateTime. There is a unknown word starting at...
Jan 03, 2007 07:40 AM|LINK
in the page that i am trying to dispaly has no datetime entry. but what i found in the log that there is only an insert statmet that include the date and time.
SELECT SQ.NEXTVAL FROM dual
INSERT INTO AD_AUDIT_RECORDS ( ACTION_ID,RECORD_ID,FORM_ID,USER_ID,AT_DATE,AT_TIME,AT_ACTION,AT_KEY )VALUES(3871,256,18,1,TO_DATE('03/01/2006','dd/mm/yyyy'),'11:44 AM','View','USER_ID = 700001' )
pickyh3d
Star
9696 Points
1955 Posts
Re: Error: The string was not recognized as a valid DateTime. There is a unknown word starting at...
Jan 04, 2007 09:20 PM|LINK
You can change the time to military time (for the database since you said you're not displaying anything) by changing the date/time format string to "t" for just the hours and minutes (e.g., "20:13" for 8:13 PM) and "T" for the hours, minutes, and seconds (e.g., "20:13:54" for 8:13:54 PM).
I don't know that this SQL query is actually the problem because it's not even using your time's timestamp (hh:mm:ss tt, which would be "03:04:01 AM" and "04:33:21 PM" [I showed both to point out the leading zeros and the fact that it uses 01 - 12 hours instead of 0 - 23 hours]), which I noticed because the query does not use have the seconds portion of your timestamp. I'd guess the timestamp being used is "hh:mm tt" or maybe just "h:m tt" -- there are no leading zeros in the supplied time to be able to tell which is used.
ounlopez
Member
135 Points
41 Posts
Re: Error: The string was not recognized as a valid DateTime. There is a unknown word starting at...
Mar 08, 2007 11:12 PM|LINK
Was this problem ever solved? I am having a similar problem, and not sure where in my script it is ocurring.
Any ideas?
Thanks,
Oun