Apache Lucene.Net 2.4.0 Class Library API

DateTools.TimeToString Method 

Converts a millisecond time to a string suitable for indexing.

public static string TimeToString(
   long time,
   Resolution resolution
);

Parameters

time
the date expressed as milliseconds since January 1, 1970, 00:00:00 GMT
resolution
the desired resolution, see {@link #Round(long, 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