c#中 DateTime字段,如何录入日期

2025-03-23 07:11:20
推荐回答(1个)
回答1:

需要转换一下,你直接赋值肯定要出错的,比如像这样

DateTime tmp = DateTime.Parse("2014-02-28");

这样就对了