I have a dateTimePicker1 in my form and it display the time with hour and seconds but i just need to display just the day like 27/11/2014 00:00:00 And this is my code
DateTime dt1 = dateTimePicker1.Value;
DateTime d1 = Convert.ToDateTime(dt1);
I have a dateTimePicker1 in my form and it display the time with hour and seconds but i just need to display just the day like 27/11/2014 00:00:00 And this is my code
DateTime dt1 = dateTimePicker1.Value;
DateTime d1 = Convert.ToDateTime(dt1);
go to your dateTimePicker1's properties and select Custom for Format option. than go to Custom Format option and dd/MM/yyyy hh:mm:ss. You can make your own format from here and if u look at form before ask u could find here or here