public static ToSortableIntTime ( this dt, bool includeMilliseconds = false ) : int | ||
dt | this | |
includeMilliseconds | bool | |
return | int |
public static int ToSortableIntTime(this DateTime dt, bool includeMilliseconds = false)
{
long sortableTime = ToSortableLongTime(dt, includeMilliseconds);
if(sortableTime > int.MaxValue)
throw new Exception("{0:#,#0} value exceeds maximum integer value".SmartFormat(sortableTime));
return (int)sortableTime;
}