Datetimepicker value
how we delete the time from datetimepicker control? plz help.
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
ArshadRank #2,492 · 564 reputationPosted Apr 11, 2011, 4:51 AM EDT
you will have the InitializeComponent() method, there your control will get initialize, just put the below line while initializing the datetimepicker control
this.dateTimePicker.CustomFormat = "dd.MM.yyyy";
this.dateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dateTimePicker.Location = new System.Drawing.Point(15, 55);
this.dateTimePicker.Name = "dateTimePicker";
this.dateTimePicker.Size = new System.Drawing.Size(249, 22);
this.dateTimePicker.TabIndex = 0;
just follow the above two highlighted line.
Regards,
Arshad