Rounds the specified date to the nearest period.

Namespace:  RightEdge.Common
Assembly:  Common (in Common.dll) Version: 2010.1.0.0 (2010.1.0.0)

Syntax

C#
public static DateTime RoundTime(
	DateTime date,
	TimeSpan period
)
Visual Basic (Declaration)
Public Shared Function RoundTime ( _
	date As DateTime, _
	period As TimeSpan _
) As DateTime
Visual C++
public:
static DateTime RoundTime(
	DateTime date, 
	TimeSpan period
)

Parameters

date
Type: System..::.DateTime
Input date.
period
Type: System..::.TimeSpan
Rounding period.

Return Value

Rounded DateTime instance.

See Also