Hi,
please how do i get the date alone from the datepicker of WPF C#. i get this after choosing the date 23/03/2013 12:00AM i only want 23/03/2013.
i Have not seen any method of extracting this from the datepicker please help.
thanks
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Mar 25, 2013, 7:59 PM
if (datePicker1.SelectedDate != null)
{
string date = ((DateTime)datePicker1.SelectedDate).ToShortDateString();
MessageBox.Show(date);
}