我有一个数据网格视图,我用数据库作为其数据源填充。但是,以日期为数据类型的列显示日期和时间,而我只需要时间。
如何更改数据网格视图表的格式?
Private Sub prcDisplayTable()
dgvViewLecturers.DataSource = Nothing
dgvViewLecturers.Rows.Clear()
dgvViewLecturers.Columns.Clear()
strSQL = "SELECT * FROM Lecturers"
strTableName = "ViewLecturers"
daLecturers = New OleDb.OleDbDataAdapter(strSQL, con)
daLecturers.Fill(dsLecturers, strTableName)
dgvViewLecturers.DataSource = dsLecturers
dgvViewLecturers.DataMember = strTableName
End Sub