Giorgi / DuckDB.NET

Bindings and ADO.NET Provider for DuckDB
https://duckdb.net
MIT License
343 stars 62 forks source link

time with milliseconds is not handled properly #74

Closed mikeTWC1984 closed 1 year ago

mikeTWC1984 commented 1 year ago

Steps to reproduce:


        var duckDbCommand = connection.CreateCommand();
        duckDbCommand.CommandText = "select  now() as tme";
        var reader = duckDbCommand.ExecuteReader();
        reader.GetDateTime(0)

This will crash with below error

"Valid values are between 0 and 999, inclusive. (Parameter 'millisecond')"

now function returns time with milliseconds. If specifying time without milliseconds (e.g. TIMESTAMP '1992-09-20 20:38:40' ) GetDateTime works correctly

Giorgi commented 1 year ago

Fixed in #93