String was not recognized as a valid DateTime.
  • hi please how i can resolve this problem String was not recognized as a valid DateTime.

    i have this record in my table T

    ORDER_Date datetime not null, in this Format '2013-02-01 00:00:00.000'

    but when i do that in my method to show record

    T TOrd = new T () ;
    T.ORDER_Date = Convert.ToDateTime(dr[0]);
    always i get this error please help me thank you friends ;) .
  • 2 Comments sorted by
  • Vote Up0Vote Down itworkeritworker
    38.50 Karma Accepted Answer
    use
    DateTime.Parse(dr["DateColumnName"])
  • Thank you so much Itworker :) .

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook

Popular Posts of the Week

    Optimum Creative