String was not recognized as a Valid Date Time

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pankajprakash
    New Member
    • Feb 2007
    • 70

    String was not recognized as a Valid Date Time

    Hi All,

    I Made a window application in c#.net and trying to fetch the record from the postgresql database. But whever i run the application "String was not recognized as a Valid Date Time" message show. This problem is arries from the database when it tries to fetch the record from a table in which timestampz datatype is used. so plz help me to solve this problem.
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    You need to change the format, maybe something like:
    Code:
    this.CustomFormat = "MM/dd/yyyy";
    this.Format = System.Windows.Forms.DateTime.Custom;
    Hope that this helps.

    Comment

    Working...