G
Gerben van Loon
Hi,
I'm trying to save a datetime value in an access datetime field. But weird
enough it only saves the date and not the time. I'm using the folowing piece
of code:
//Compose date
string datetemp;
datetemp = "28-6-2003 8:00:00";
DateTime startdate = DateTime.Parse(datetemp);
//Add to dbase
DStest.testRow row = DStest1.test.NewtestRow();
row.start = startdate;
DStest1.test.AddtestRow(row);
DAtest.Update(DStest1);
//Ceck or variable had the time in it
lblDisplayDate.Text = startdate.ToString(); //label shows date and time!
This last line of code displays me the date and also the time, but in the
dbase there is only the date. The dbase should be ok, because I can manualy
enter the datetime value I used in the code. Anybody a solution for this
problem?
thanks,
Gerben
I'm trying to save a datetime value in an access datetime field. But weird
enough it only saves the date and not the time. I'm using the folowing piece
of code:
//Compose date
string datetemp;
datetemp = "28-6-2003 8:00:00";
DateTime startdate = DateTime.Parse(datetemp);
//Add to dbase
DStest.testRow row = DStest1.test.NewtestRow();
row.start = startdate;
DStest1.test.AddtestRow(row);
DAtest.Update(DStest1);
//Ceck or variable had the time in it
lblDisplayDate.Text = startdate.ToString(); //label shows date and time!
This last line of code displays me the date and also the time, but in the
dbase there is only the date. The dbase should be ok, because I can manualy
enter the datetime value I used in the code. Anybody a solution for this
problem?
thanks,
Gerben