What's the best way to round an HH:MM value to the closest 15 minute interval? I don't track seconds so they don't matter.
00:08:00 becomes 00:15:00
00:07:00 becomes 00:00:00
01:59:00 becomes 02:00:00
and so on. Is there an elegant, non UDF or Case statement method for doing this?
EDIT: Here's the SQL I'm using to get the above values that I'd like to round:
CONVERT(CHAR(8), DATEADD(n, SUM(DATEDIFF(n, starttime, stoptime)), 0), 108)
starttime and stoptime are SQL datetimes.