#25 Wrong Time format conversion

open
nobody
None
5
2004-10-24
2004-10-24
Anonymous
No

When I try to read from a table wich contains a 'Time'
column (ex. format hh:mm:ss) I get a conversion error
(the MySQLDataReader tries to convert the string in a
DateTime object but fails).

Discussion

  • Logged In: YES
    user_id=445113

    MySQLDataReader.cs
    line 160 and 164
    it looks like the second string on the input to ParseExact
    is done wrong.

    Line 160 input to ParseExact has the format as "yyyy-MM-dd
    HH:mm:ss" but it looks like the timestamp(14) column that i
    have used is formatted to "yyyyMMddHHmmss".

    Line 164 has a similar thing, the "-" and " " and ":" need
    to be removed.