G
Guest
I have a simple app that lists some times from a SQL database
dt.Columns.Add(New DataColumn("Start Time", GetType(String)))
Dim cn As New SqlConnection(sqlConnString)
cn.Open()
sqlStatement = "Select EndTime from Mytable
Dim cmd As New SqlCommand(sqlStatement, cn)
Dim dr As SqlDataReader = cmd.ExecuteReader
Do While dr.Read()
MyDataRow = dt.NewRow()
MyDataRow(0) = dr.GetString(0)
dt.Rows.Add(MyDataRow)
DataGrid1.databind
....
so thequestion is if I amtrying to add the date to the datagrid, how can I
convert it to military format (13:00 instead of 1:00)?
Thanks in advance
dt.Columns.Add(New DataColumn("Start Time", GetType(String)))
Dim cn As New SqlConnection(sqlConnString)
cn.Open()
sqlStatement = "Select EndTime from Mytable
Dim cmd As New SqlCommand(sqlStatement, cn)
Dim dr As SqlDataReader = cmd.ExecuteReader
Do While dr.Read()
MyDataRow = dt.NewRow()
MyDataRow(0) = dr.GetString(0)
dt.Rows.Add(MyDataRow)
DataGrid1.databind
....
so thequestion is if I amtrying to add the date to the datagrid, how can I
convert it to military format (13:00 instead of 1:00)?
Thanks in advance