Limit a date's resolution. For example, the date
CopyC#
2004-09-21 13:50:11
will be changed to
CopyC#
2004-09-01 00:00:00
when using
CopyC#
Resolution.MONTH
.

Namespace: Lucene.Net.Documents
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1

Syntax

C#
public static DateTime Round(
	DateTime date,
	DateTools..::..Resolution resolution
)
Visual Basic
Public Shared Function Round ( _
	date As DateTime, _
	resolution As DateTools..::..Resolution _
) As DateTime
Visual C++
public:
static DateTime Round(
	DateTime date, 
	DateTools..::..Resolution^ resolution
)

Parameters

date
Type: System..::..DateTime

[Missing <param name="date"/> documentation for "M:Lucene.Net.Documents.DateTools.Round(System.DateTime,Lucene.Net.Documents.DateTools.Resolution)"]

resolution
Type: Lucene.Net.Documents..::..DateTools..::..Resolution
The desired resolution of the date to be returned

Return Value

the date with all values more precise than
CopyC#
resolution
set to 0 or 1

See Also