Any idea how to build datediff query that calculate time that possibly crosses midnight?
Of course, if that is one case, I would calculate separately part to and from midnight, but I need universal query, because I have thousands of rows, where some of them crosses midnight, and some not, and for every one of them I have to calc. datediff (which is up to 10 minutes, can’t cross 2 days for that matter).
The DATEDIFF function handles both cases.