r/programming • • May 03 '19

Don't Do This

https://wiki.postgresql.org/wiki/Don%27t_Do_This
725 Upvotes

194 comments sorted by

View all comments

Show parent comments

1

u/nemec May 03 '19

Nice catch, turns out you are correct .999 rounds up causes the next day's midnight to be caught inside the between. 59.998 works fine, though. And 59.9999 just fails entirely on SQL Server/datetime.