DateTimePicker1.Format = DateTimePickerFormat.Short;ms-help://MS.MSDNQTR.2003FEB.2052/cpref/html/frlrfsystemwindowsformsdatetimepickerformatclasstopic.htm

解决方案 »

  1.   

    dtp.Value=Convert.ToDateTime("2003-02-01"); 
    不是这样么
      

  2.   

    DateTime.Parse("2003-12-11 11:34:25").ToShortDateString()
      

  3.   

    DateTime.Parse(DateTimePicker1.Value).ToString("yyyy-MM-dd");
      

  4.   

    可以将Format属性设成Custom,再CustomFormat属性进行自定义定制
    要不就是把得到的时间截下来,只用前面的
      

  5.   

    是格式的话如下
    public void CreateMyDateTimePicker()
    {
       // Create a new DateTimePicker control and initialize it.
       DateTimePicker dateTimePicker1 = new DateTimePicker();   // Set the MinDate and MaxDate.
       dateTimePicker1.MinDate = new DateTime(1985, 6, 20);
       dateTimePicker1.MaxDate = DateTime.Today;   // Set the CustomFormat string.
       dateTimePicker1.CustomFormat = "MMMM dd, yyyy - dddd";
       dateTimePicker1.Format = DateTimePickerFormat.Custom;   // Show the CheckBox and display the control as an up-down control.
       dateTimePicker1.ShowCheckBox = true;
       dateTimePicker1.ShowUpDown = true;
    }