|
-
Feb 1st, 2005, 11:40 PM
#1
Thread Starter
New Member
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
-
Feb 1st, 2005, 11:59 PM
#2
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.
Tips:
- Google is your friend! Search before posting!
- Name your thread appropriately... "I Need Help" doesn't cut it!
- Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
- Allways Include the Name and Line of the Exception (if one is occuring!)
- If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)
If you think I was helpful, rate my post  IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous
-
Feb 3rd, 2005, 03:43 PM
#3
Thread Starter
New Member
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
-----------------------------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|