home / software / tips and tricks / How to round Up Time to Nearest Minutes Interval

How to round Up Time to Nearest Minutes Interval

Updated:  01/10/2013 09:01 AM
Author:  Shiju Mathews

Status:    Resolved.


There can be situations where we need to round up the times to the interval of 1, 5, 15, 30 or 60’s.

This method is little lengthy, but simple and room for modifications.

Run the following test and see


Results
-----------------------
1900-01-01 18:00:00.000

(1 row(s) affected)

-----------------------
2013-01-10 12:05:00.000
(1 row(s) affected)

G0

-----------------------
2012-11-03 00:00:00.000

(1 row(s) affected)

Tags: How to round Up Time to Nearest Minutes Interval
Updated on: November 2024