Re: 'String was not recognized as a valid DateTime



Hi,

Just check what is the value you are getting from
Request.Form["openDate"].
I just works like this.

string date = "04/21/2005"; // in the format mm/dd/yyyy;
DateTime temp = DateTime.Parse(date);

//The above code runs without any exception.

Just check what the string are you getting using
Request.Form["open_date"];

Regards,
angrez

.



Relevant Pages

  • Newbie: Catching the Abort method to destroy a thread
    ... This is beyond my skill-set. ... and my ASP.NET app seems to be ... is this a "critical" exception? ... Prev by Date: ...
    (microsoft.public.dotnet.framework.aspnet)
  • .NET System.DirectoryServices question
    ... If the domain name is incorrect, the DirectoryEntry.Exists call takes a LONG ... time to return and throws an exception with the message "The server is not ... Prev by Date: ...
    (microsoft.public.win2000.active_directory)
  • .NET System.DirectoryServices question
    ... If the domain name is incorrect, the DirectoryEntry.Exists call takes a LONG ... time to return and throws an exception with the message "The server is not ... Prev by Date: ...
    (microsoft.public.dotnet.framework)
  • Re: new line
    ... > How to write this code but with exception to put a function.Name into a ... > I want to get a string name into a list like this: ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How do you guys handle errors from class libraries?
    ... I would throw an exception in the call. ... Regards, ... Jeff ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)

Loading