请大家帮忙 dategrid没办法显示具体时间 急 哪未大哥可以帮小弟
strSQL &= "Select id as '会员编号',name as '会员名称',onduty as '上班时间',offduty as '下班时间' From duty
我的数据库表中的数据是2004-02-13 13:17:04
为什么我的dategrid不能显示具体时间 只能显示日期2004-02-13
怎么样才能全显示呢
我该怎么修改这个strsql呢 显示具体时间
下边是我的载入到dategrid的代码:
Dim strSQL As String
Dim dtResults As New DataTable
strSQL &= "Select id as '会员编号',name as '会员名称',onduty as '上班时间',offduty as '下班时间' From duty WHERE id like '" & TextBox1.Text & "%'and onduty between '" & DateTimePicker1.Value & "' and '" & DateTimePicker2.Value & "'"
'-- Use the SQL String to build the DataAdapter and fill the DataTable.
Dim odaResults As New OleDb.OleDbDataAdapter(strSQL, _
BuildCnnStr("(local)", "bookshop"))
Try
dtResults.Clear()
odaResults.Fill(dtResults)
Catch excp As Exception
MessageBox.Show(excp.Message)
Exit Sub
End Try
'-- Assign the DataTable to the DataGrid's DataSource property
Me.DataGrid1.DataSource = dtResults
问题点数:0、回复次数:4Top
1 楼chenzhuo1980(chenzhuo1980)回复于 2004-06-28 11:49:01 得分 0
学习中,俺也想知道这个问题怎么解决,哪位高手可不可以来给说的稍微详细点啊! 谢谢!!!Top



