开发者

datetime passing to reportviewer

开发者 https://www.devze.com 2023-02-20 01:25 出处:网络
I got an error: The string was not recognized as a valid DateTi开发者_如何转开发me. There is a unknown word starting at index 0Ron, you have to parse the data since it\'s of type nvarchar.

I got an error:

The string was not recognized as a valid DateTi开发者_如何转开发me. There is a unknown word starting at index 0


Ron, you have to parse the data since it's of type nvarchar.

For example:

DataTable dt = GetData();

DateTime startDate;

DateTime.TryParse(dt.Rows[0]["StartDate"].ToString(), out startDate);

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号