Datetimepicker info

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.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!