Apache Lucene.Net 2.4.0 Class Library API

DateTools.DateToString Method 

Converts a Date to a string suitable for indexing.

public static string DateToString(
   DateTime date,
   Resolution resolution
);

Parameters

date
the date to be converted
resolution
the desired resolution, see {@link #Round(Date, DateTools.Resolution)}

Return Value

a string in format

yyyyMMddHHmmssSSS
or shorter, depeding on
resolution
; using GMT as timezone

See Also

DateTools Class | Lucene.Net.Documents Namespace