Sorry for posting .. just half a message but i pressed enter outside the input field :here is entire problem . tnx in advance
i'm trying to extract a datetime value from a mysql database.The feld is in format
yyyy-mm-dd 00:00:00 and the datareader extracts something like this '4/1/2007' ,i don't figure it out where i go wrong
i tried with allow zero datetime=true, but is not working , i tried all the possibilities .. i don't know where is the problem ..
i tried with DR.getDateTime(i)
my code is :
conn3.ConnectionString = myConnString
conn3.Open()
comanda.Connection = conn3
Dim sqlQueryCommand As New MySqlCommand("select * from " & table & " ;", conn3)
Dim DR As MySqlDataReader
DR= sqlQueryCommand.ExecuteReader()
While DR.Read
For i = 0 To DR.FieldCount - 1
Dim tip = DR.GetFieldType(i)
If tip.ToString = "System.DateTime" Then
Dim exacttime = DR.GetDateTime(i)
Console.write(exacttime)
End If
Next
End while
conn3.close()