-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
SQLite: Translate TimeSpan members #18844
Comments
I made some good progress in bricelam:timespan, but I ran into floating-point precision issues and wanted to re-examine how we handle TimeSpan and DateTime literals and parameters on SQLite before moving forward.
In order to get this to round to the correct time we need to re-create the TimeSpan (and possibly DateTime) instances in various places using a constructor overload that doesn't take |
We could also consider adding a collation.
|
Note, we can use the |
We can enable these by registering two UDFs on the connection:
The following translations are enabled.
Notes:
datetime()
should actually be translated asrtrim(rtrim(strftime('%Y-%m-%d %H:%M:%f'), '0'), '.')
julianday(datetime(text, modifiers))
can reduce tojulianday(text, modifiers)
julianday(datetime(real))
can reduce toreal
ef_days(ef_timespan(real))
can reduce toreal
The text was updated successfully, but these errors were encountered: