i have a date n time pickr on form i want it take its value from database, rd is data reader eg
up.textBox15.Text = rd["No_of_installments"].ToString(); this line is ok
up.dateTimePicker1.Value = DateTime( rd["date"]); error
up.dateTimePicker1.Value = DateTime( rd["date"]); error
Sanjeeb LenkaPosted Sep 8, 2013, 11:50 AM
provide the error msg and database data which you want to show in this.
ta muPosted Sep 8, 2013, 11:37 AM
this is correct
up.dateTimePicker1.Value = System.Convert.ToDateTime(rd["date"]);
Sanjeeb LenkaPosted Sep 8, 2013, 10:11 AM
try this
up.dateTimePicker1.Value = Convert.ToDateTime( rd["date"]);