Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieving a datetime field form a windows CE database table

Status
Not open for further replies.

HanzieV

Programmer
Apr 8, 2003
17
0
0
BE
Hi,

I'm trying to retrieve a datetime field from a WinCE database table using the following code:

DateTime LupdDate;

System.Data.SqlServerCe.SqlCeCommand sqlCeCommand2 = new
System.Data.SqlServerCe.SqlCeCommand("select LupdDate from Product where prodid =12036",SqlCeProvider.Connection);

sqlCeCommand2.Connection.Open();

LupdDate = (DateTime)sqlCeCommand2.ExecuteScalar();

The problem is that I only get the date part of the datetime.

Any ideas why ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top