C#怎么设置DateTimePicker控件显示当前的时分秒时间
C#怎么设置DateTimePicker控件显示当前的时分秒时间,谢谢
//显示当前时间 private void button1_Click(object sender, EventArgs e) { this.dateTimePicker1.Format= DateTimePickerFormat.Custom; this.dateTimePicker1.CustomFormat = "yyyy-MM-dd HH:mm:ss"; this.dateTimePicker1.Value = DateTime.Now; }