Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
I have a form with a button, textbox and a datetimepicker.
I want to click on datetimepicker and choose a date, then click on button, then the date should show in the textbox.
After I have click on datetimepicker and then the button ,it shows the date, but in the wrong format.
Here is my code
DateTimePickerOutDate.Format = DateTimePickerFormat.Custom
DateTimePickerOutDate.CustomFormat = "dd MMMM yyyy"
txtSearchDateOut.Text = DateTimePickerOutDate.Value
The date that I want it to display must be dd mmmm yyyy (09 October 2012), but is shows in the textbox as 10/09/2012 2:43:22 PM
What am I doing wrong, is there someplace that I must change the datetimepicker values as well.
0 · ·