Why in SQL Server if I do this:
SELECT CONVERT(datetime, '2020-06-23 23:21:22.302', 121)
I get this date:
2020-06-23 23:21:22.303
Why in SQL Server if I do this:
SELECT CONVERT(datetime, '2020-06-23 23:21:22.302', 121)
I get this date:
2020-06-23 23:21:22.303
Its because datetime in SQL Server is only accurate to 3ms and will round to increments of of .000, .003, or .007 seconds
Try this:
SELECT convert(datetime, '2020-06-23 23:21:22.302', 121)
SELECT convert(datetime2, '2020-06-23 23:21:22.302', 121)
SELECT convert(datetime2(3), '2020-06-23 23:21:22.302', 121)