I have a date in a DataTable (dt). How to read a Date from a DataTable into a textbox
I can read a string in fine:
tbEvent.Text = dt.Rows[0].Field<String>(0);
I tried this but I get an error:
Unable to cast object of type 'System.DateTime' to type 'System.String'.
tbDate.Text = dt.Rows[0].Field<DateTime>(1);
Regards Tea