G
Guest
All,
Using C# with ADO.NET I am trying to save a date time to an Access database.
After the saving occurs I open Access database and only see the date not the
time.
I know the time was part of the DateTime object prior to saving it. Also
while in Access I tried changing the format of the date time field to see the
time, which showed it as 12:00 AM and is incorrect.
See code snippet below:
DataRow newRow = dataSet12.Table1.NewRow();
newRow["Index"] = 5;
newRow["Column1"] = "Added";
newRow["MyDateTime"] = DateTime.Now; // <== Time is in object
dataSet12.Table1.Rows.Add(newRow);
Does anyone know who to have the time saved ad well?
Thanks in advance for any help.
Scott
Using C# with ADO.NET I am trying to save a date time to an Access database.
After the saving occurs I open Access database and only see the date not the
time.
I know the time was part of the DateTime object prior to saving it. Also
while in Access I tried changing the format of the date time field to see the
time, which showed it as 12:00 AM and is incorrect.
See code snippet below:
DataRow newRow = dataSet12.Table1.NewRow();
newRow["Index"] = 5;
newRow["Column1"] = "Added";
newRow["MyDateTime"] = DateTime.Now; // <== Time is in object
dataSet12.Table1.Rows.Add(newRow);
Does anyone know who to have the time saved ad well?
Thanks in advance for any help.
Scott