How to query with DEPART(), using sql CE, so that only the time part of a datetime field display in

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Dim strSql1 As String
Try
strSql1 = "SELECT * FROM LK_ETC"
Dim da = New OleDb.OleDbDataAdapter(strSql1, con)
Dim ds As New DataSet
da.Fill(ds, "LK_ETC")
With cboETC
.DataSource = ds.Tables("LK_ETC")
.DisplayMember = "timeInterval"
.ValueMember = "ETCID"
.SelectedIndex = -1
End With

Catch ex1 As Exception
MsgBox(ex1.Message)
End Tryabove is my current code and it is returning the date time format as defined in the database rather as desired (i.e. time part of the date time) what do i need to do to fix my code to get such result?
OTC(One Tooth Coder)

View the full article
 
Back
Top