Lucene.Net 1.9.1 Class Library

DateTools.Round Method (DateTime, Resolution)

Limit a date's resolution. For example, the date

2004-09-21 13:50:11
will be changed to
2004-09-01 00:00:00
when using
Resolution.MONTH
.

public static DateTime Round(
   DateTime date,
   Resolution resolution
);

Parameters

date
resolution
The desired resolution of the date to be returned

Return Value

the date with all values more precise than

resolution
set to 0 or 1

See Also

DateTools Class | Lucene.Net.Documents Namespace | DateTools.Round Overload List