News for hackers. Stuff that matters.
Re:PostgreSQL's Missing DateDiff Function by castorp on Wednesday December 22, 2021 @08:08AM (#29648796)
But the difference between 2021-01-01 and 2020-12-31 is only one day, not a year.

It gets even strange for e.g. select DATEDIFF(year, '2021-12-01', '2022-01-01') which still returns 1 even though that's a whole month. I don't see a use case for this kind of result

There are no comments on this comment yet.