views:

274

answers:

3

I have a DateTimePicker and it is currently displaying "Friday, June 26 2009"

How would I change it so it displays "June 26 2009"?

+7  A: 

DateTimePicker.CustomFormat

myDateTimePicker.CustomFormat = "MMMM dd yyyy";

You can set this in this in the designer too.

MSDN is your friend.

Jason
+1 - RTFM - Read The Friendly MSDN docs :-)
marc_s
thanks I knew it was somewhere i just coulnt remember where
Crash893
actually i gave it a try from the designer too and it didnt work? there should be no diffrence between doing it code time or design time should there?
Crash893
A: 

You can send the DateTime method ToString(), any format which you would like to be displayed.

For example, this would display, '26 June 2009' DateTime.Today.ToString("dd MMMM yyyy");

How would you do this in the DateTimePicker control?
Lucas
A: 

this code worked for me

    DTP_deltek.CustomFormat = "MMM-dd-yyyy";
    DTP_deltek.Format = DateTimePickerFormat.Custom;
Crash893