I want to Change the Format of date selected in DateTimePicker in WPF Application
views:
3682answers:
4
A:
Typically the date time format is stored in a resource file, because this would help in internationalization of the app.
You can pick up the format from the resource file & use a ToString(DATE_FORMAT)
in your case you might want to use
dateTimePicker.SelectedDate.ToString("dd-MMM-yyyy");
AB Kolan
2009-03-13 05:47:53
A:
In XAML:
<toolkit:DatePicker SelectedDateFormat="Long" />
or
<toolkit:DatePicker SelectedDateFormat="Short" />
Stuart Campbell
2009-11-10 05:54:11
A:
DatePicker1.SelectedDate = DatePicker1.SelectedDate.Value.ToString("dd/MM/yyyy")
Dee
2009-12-29 10:05:59