I have a DateTimePicker in my form, and I set the value for the custom format property “dd / MM / yyyy” ant when I run this code:
MessageBox.Show(dateTimePicker1.Value.ToString());
I get this value: 03/26/2010 1:26.
How can I remove part of the time from a value.
I know that we can use this method
dateTimePicker1.Value.ToShortDateString();
but I want to set the value property to this format "dd / MM / yyyy" , so the output will be like this "26/3/2010" , because I want to store the value in my database (SQL)
How can i do this?
salhzmzm
source share