Lucene.Net 1.9.1 Class Library

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

See Also

DateTools Class | Lucene.Net.Documents Namespace