Retrieving a DateTime value from a DataRow (C#)

后端 未结 8 1472
别跟我提以往
别跟我提以往 2020-12-09 04:06

How can I get DateTime value in C# from row, the current code is giving me error any help is appreciated, the data is coming in from progress database:

8条回答
  •  星月不相逢
    2020-12-09 04:12

    DateTime.Parse(r["FISS"].ToString()) is the way to go, but it throws a "String was not recognized as a valid DateTime" error. Could you show the actual string in the r["FISS"] column, it might be a internationalisation problem....

提交回复
热议问题