Why not just write `abs(datediff(...))`? [See the docs](https://sqlite.org/lang_corefunc.html#abs). …and then ask why you've got your start and end times swapped.
Why not just write `abs(datediff(...))`? [See the docs](https://sqlite.org/lang_corefunc.html#abs). …and then ask why you've got your start and end times swapped.