Select to view content in your preferred language

VB or SQL for Time Rounding?

787
0
02-27-2013 03:48 AM
LarryGaudieri
Deactivated User
Hello everyone,

I need a simple solution for rounding time to the nearest minute. I have two date fields (one represents a start time, the other a finish time both in HH:MM:SS) and I've calculated a duration field with (DateDiff ( "n", [STARTTIME], [FINISHTIME] ) which results in a single minute value. The target field is Float type and after the calculation one can see residual rounding issues (EG: 21:10 being rounded to 22).

Is there some code I can include with the above DateDiff calc (or even run as stand alone) that will round to the nearest minute? (under 30-down, 30 and over-up). Any help would be mucho appreciated. Thanks.

Larry
Tags (2)
0 Kudos
0 Replies