Method Round
Round(DateTime, DateTools.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
.
Declaration
public static DateTime Round(DateTime date, DateTools.Resolution resolution)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | date | |
DateTools.Resolution | resolution | The desired resolution of the date to be returned |
Returns
Type | Description |
---|---|
System.DateTime | the date with all values more precise than |
Round(Int64, DateTools.Resolution)
Limit a date's resolution. For example, the date 1095767411000
(which represents 2004-09-21 13:50:11) will be changed to
1093989600000
(2004-09-01 00:00:00) when using
Resolution.MONTH
.
Declaration
public static long Round(long time, DateTools.Resolution resolution)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | time | The time in milliseconds (not ticks). |
DateTools.Resolution | resolution | The desired resolution of the date to be returned |
Returns
Type | Description |
---|---|
System.Int64 | the date with all values more precise than |