如题。
数据库中存储的时间字段(YM)是varchar类型的(如“200408”)现在想把值输出到DateTimePicker 控件上,控件本身的显示方式已设置为“yyyy年MM月”的格式。如下:
 this.dTP1.CustomFormat = "yyyy年MM月";
 this.dTP1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
求使得数据库中得时间字段能在控件中正确显示的代码。谢谢!