Re: How do I set the DateTimeMode property when filling a DataTable



I am still hoping there is a better way, but I was able to set it, as
long as I add the columns to the DataTable before calling the
adapter.Fill() method.

....
DataTable dt = new DataTable("TryIt");
dt.Columns.Add("utc", typeof(DateTime));
dt.Columns["utc"].DateTimeMode = DataSetDateTime.Utc;
dt.Columns.Add("local", typeof(DateTime));
dt.Columns["local"].DateTimeMode = DataSetDateTime.Local;
adapter.Fill(dt);
....

.