Hi
The lines:
Convert.ToDateTime(this.dateTimePicker1.Value).ToString("MM/dd/YYYY");
will not even allow you to compile. It's because dateTimePicker1.Value will return a datetime datatype and it will give you the error "Cannot implicitly conversion.
you have two options two store the value of dateTimePicker1 in a variable.
1. store it as string type.
string date;
date = dateTimePicker1.Value.ToString("yyyy/MM/dd");
OR
2. store it as datetime type.
DateTime date;
date = dateTimePicker1.Value;
and then you can set these with text box control like( textBox1.Text =date;) and set into sql query like('"+Date+"')
Thanks
There are various ways to save and retrieve this in a database.
Happy to Help....Thanks