Hi,
Does anyone know whether it is possible to change the datetimemode when using a datareader. All the examples, as below, I can find use a datatable.
SqlCommand command = new SqlCommand("SELECT EmployeeID, FullName, DateCreated, DateAppointment FROM [Employees] ...", connection);
SqlDataAdapter adapter = new SqlDataAdapter(command);
DataTable result = new DataTable();
adapter.FillSchema(result, SchemaType.Source);
result.Columns["DateCreated"].DateTimeMode = DataSetDateTime.Utc;
result.Columns["DateAppointment"].DateTimeMode = DataSetDateTime.Utc;
adapter.Fill(result);
return result;
Would I be better going to a datatable? Any pointers much appreciated.