Re: How do I set the DateTimeMode property when filling a DataTable
- From: kenandcorey@xxxxxxxxx
- Date: 30 Jan 2006 15:53:44 -0800
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);
....
.
- References:
- How do I set the DateTimeMode property when filling a DataTable
- From: kenandcorey
- How do I set the DateTimeMode property when filling a DataTable
- Prev by Date: How do I set the DateTimeMode property when filling a DataTable
- Next by Date: Re: VS.2005 c# Autonumber via Access with @@IDENTITY Failing
- Previous by thread: How do I set the DateTimeMode property when filling a DataTable
- Index(es):