CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects..text_blogs Tags:
Item Type: NewsGroup Date Entered: 12/22/2006 8:34:24 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 11 Views: 400 Favorited: 0 Favorite
12 Items, 1 Pages 1 |< << Go >> >|
database
Asp.Net User
Error: The string was not recognized as a valid DateTime. There is a unknown word starting at index 20.12/22/2006 8:34:24 PM

0

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.
pickyh3d
Asp.Net User
Re: Error: The string was not recognized as a valid DateTime. There is a unknown word starting at index 20.12/23/2006 5:49:52 AM

0

May we see the offending code?
Picky
database
Asp.Net User
Re: Error: The string was not recognized as a valid DateTime. There is a unknown word starting at index 20.12/23/2006 11:56:44 AM

0

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
Asp.Net User
Re: Error: The string was not recognized as a valid DateTime. There is a unknown word starting at index 20.12/23/2006 6:15:44 PM

0

Can you post the line from the config file then with the format string?
Picky
database
Asp.Net User
Re: Error: The string was not recognized as a valid DateTime. There is a unknown word starting at index 20.12/24/2006 6:26:16 AM

0

<globalization requestEncoding="utf-8" responseEncoding="utf-8"/> this line from web.config

and the sting format that is used is dd/mm/yyyy

database
Asp.Net User
Re: Error: The string was not recognized as a valid DateTime. There is a unknown word starting at index 20.12/31/2006 9:45:58 PM

0

Any idea regarding this issue??

pickyh3d
Asp.Net User
Re: Error: The string was not recognized as a valid DateTime. There is a unknown word starting at index 20.1/1/2007 2:45:43 AM

0

Can your copy paste the exact line(s) where ever your datetime format string is being entered?
Picky
database
Asp.Net User
Re: Error: The string was not recognized as a valid DateTime. There is a unknown word starting at index 20.1/3/2007 8:40:09 AM

0

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
Asp.Net User
Re: Error: The string was not recognized as a valid DateTime. There is a unknown word starting at index 20.1/4/2007 10:20:24 PM

0

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.

 


Picky
ounlopez
Asp.Net User
Re: Error: The string was not recognized as a valid DateTime. There is a unknown word starting at index 20.3/9/2007 12:12:30 AM

0

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

PeterW
Asp.Net User
Re: Error: The string was not recognized as a valid DateTime. There is a unknown word starting at index 20.8/9/2007 2:32:43 PM

0

The format of DateTimes is covered in C# docs under custom DateTime formats. This defines what characters are used to determine what output. You state dd/mm/yyyy is the format specifier

I would guess that when referring to months you not use mm but instead MM.  mm means minutes and MM means numeric month with a leading 0 if needed to ensure 2 digits are used.  Try dd/MM/yyyy.

I could be wrong but that would be my stab at it.

ounlopez
Asp.Net User
Re: Error: The string was not recognized as a valid DateTime. There is a unknown word starting at index 20.11/16/2007 7:14:33 PM

0

Unfortunately, this did not do it. I really do not understand this problem. 

12 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
Error: The string was not recognized as a valid DateTime. There is ... The string was not recognized as a valid DateTime. There is a unknown word starting at index 20. Description: An unhandled exception ...
System.FormatException: The string was not recognized as a valid ... FormatException: The string was not recognized as a valid DateTime. There is a unknown word starting at index 0. ...
Visual Basic(Microsoft) -VB.NET 2002-2008 - Sending Dates with ADO ... With trial and error I found out that the date field cause the problem. ... you should feed it a date not a string so more like this ... FormatException: The string was not recognized as a valid DateTime. There is a unknown word starting at index 1. ... Crookshanks (TechnicalUser). 19 Jul 05 5:20 ...
error:the string was not recognized as a valid DateTime [Archive ... There is an unknown word starting at index 0 i have changed the culture to ... 08-28-2007, 03:20 PM. Don't use reserved words (i.e DateTime) for ... it still says error:the string was not recognized as a valid DateTime. ...
load cluster profile failed: the string was not recognized as a ... load cluster profile failed: the string was not recognized as a valid DateTime. There is a unknown word starting at index 0. nikez Benutzermedaillen ...







visual web developer 2005 express and sql server

com component.

editing a user and adding/removing from role

@currenttimeutc is not a parameter ....

cannot instantiate object error

decrypt the data using dpapi

customizing membership

how to run a method in different user account

website administration tool - custom membership provider

encryption of web.config in shared hosting scenario

to use login control or not, can i add more fields?

membership get all applications

custom user management control

want the aspnet.mdf tables in my main database

rsa crypto security

question about asp.net 2.0 login controls

extracting profile properties (not using sqltableprofileprovider) ?

sql problems with login.

question about membership database

custom destinations for different users?

how avoid to create/delete file within codebehind file

windows user accoutn manager

'getuser' is not a member of 'membership'.

authentication tickets and session variables ?

createuserwizard customisation

info needed for web site administration tool

want to create asp.net login screen , how to code login button

membership login not working. vc 2005 express to sql 2005 (none express)

"membership credential verification failed" with iis but not with cassini

how to make the email field not required

   
  Privacy | Contact Us
All Times Are GMT