-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
No function mapping for datetime.Ticks in sqlserver #35436
Comments
What are you suggesting? |
I suggest that try to keep the function mappings of different databases consistent, increase their intersections as much as possible, and reduce their differences. Since the function mapping of datetime.Ticks can be implemented in SQL Server, why not do it? (Function mapping for datetime.Ticks implemented in sqlite) |
Sure. Are you going to submit PR? |
I have never submitted a PR, can I try? |
Absolutely! We'll help you to get it across finish line. |
I want to use the sqlserver's datediff_big function to calculate the microsecond difference from 0001-01-01 00:00:00.0 and then multiply it by 10. Is this feasible? |
That function is not available before SQL Server 2016 (13.x) and Azure Synapse. Hence, if possible, I would like to try different path. |
I think I can use datediff to get the minute difference of 0001-01-01 00:00:00.0, then multiply it by a value, and then get the ticks of seconds, milliseconds, microseconds, and nanoseconds respectively, and finally add them up. |
Although it can be implemented through other functions or client evaluation, they all have their own disadvantages.
The text was updated successfully, but these errors were encountered: