-
datetime ticket
Reading from an ACCESS table a column for time is not displaying properly
In the data grid, it always shows 30 december 1989 instead of the real time value of the table.
I was told to use a function with a ticket function to convert to min and max value of times
How do you do it before assigning each row to the data grid
Thanks
-
Re: datetime ticket
We would need to see your code, if you are using data-binding you may need to change the way you load the data into the data grid.
-
Re: datetime ticket
the coding is the following
------------------------------------
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cnn As System.Data.OleDb.OleDbConnection
cnn = New System.Data.OleDb.OleDbConnection
("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\wutemp\datagrid\bin\AccessDB.mdb;User Id=admin;Password=;")
Dim cmd1 As System.Data.OleDb.OleDbDataAdapter
cmd1 = New System.Data.OleDb.OleDbDataAdapter("SELECT * FROM
Contacts " & _
"ORDER BY hired_time", cnn)
Dim ds As DataSet = New DataSet
cmd1.Fill(ds, "contacts")
Me.DataGrid1.DataSource = ds.Tables("contacts")
End Sub
--------------------------------
the display of the grid for the date/time access column for all rows is the same
12/30/1899
something where maybe ticket needs to be declared so it finds min and max valut for time?
Please help
-----------------------------