Read an Oracle DATE type and convert to .NET DateTime type
Posted on 2004-09-02
I am want to read an Oracle column of type DATE and convert it into a .NET DateTime object.
I wrote a small console app to test my code in:
strSQL = "SELECT time_stamp FROM action_tbl WHERE status = 'WAITING'"
oledbselect1 = New OleDb.OleDbCommand(strSQL, oledbconnect1)
dbRdr = oledbselect1.ExecuteReader()
hour = dbRdr.Read.toString()
This works, but I'm not seeing a string that looks like a date/time. Instead it comes back with "TRUE" for every record containing a value in the time_stamp column.
I have tried dropping the .toString() method and get the same result.
I am trying to convert to the .NET DateTime type so I can use the DateDiff method.