How many minutes are there between 4:30:00 (four thirty) and 4:31:59 (four thirty-one and 59 seconds)?
I reckon the answer is "nearly two", but the best answer is probably the old classic "it depends" :-)
Recently I was asked to check some code to ensure something does not take longer than 1 minute, given a start time and end time down to the second. The current code was T-SQL's DATEDIFF function, and when input the my example above, the answer was "1 minute":
SELECT DATEDIFF(mi, '1/Jan/2000 4:30:00', '1/Jan/2000 4:31:59')
Clearly, 1 minute and 59 seconds is longer than 1 minute. What gives?
It turns out...