更新时间:2023-02-11 22:57:11
检查数据库中的日期格式.
如果它们不同,则是问题的根源.
尝试对日期时间选择器和数据库使用相同的格式.
设置DateTimePicker的使用范围
:
Check date format in your DataBase.
If they are different ,then problem occuers.
try to use same format with both datetime picker and Database.
to set DateTimePicker foramt use
:
dateTimePicker1.CustomFormat = "dd-MM-yyyy";
dateTimePicker1.Format = DateTimePickerFormat.Custom;