Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

time with milliseconds is not handled properly #74

Closed
mikeTWC1984 opened this issue Dec 20, 2022 · 1 comment
Closed

time with milliseconds is not handled properly #74

mikeTWC1984 opened this issue Dec 20, 2022 · 1 comment

Comments

@mikeTWC1984
Copy link
Contributor

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 pushed a commit that referenced this issue Apr 4, 2023
* Fix for handling microseconds
Update tests & new test data

* Use ticks to retain microsecond granularity

* Use ticks to retain microsecond granularity

* Remove unused constructor

* Removed old comment and align test cases

* Align test case

* Update utils method to take optional microseconds

* Change ToTicks method to property
@Giorgi
Copy link
Owner

Giorgi commented Apr 5, 2023

Fixed in #93

@Giorgi Giorgi closed this as completed Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants