Method ToDateTime
ToDateTime()
Converts the value represented by this instance to a
DateTime object.
Declaration
public override DateTime ToDateTime()
Returns
Type | Description |
---|---|
DateTime | A DateTime value constructed from the value represented by this instance as a number of milliseconds since the Unix Epoch. |
Overrides
Remarks
This method constructs DateTime object from the
value represented by this instance interpreted as a number of
milliseconds since the Unix Epoch, 00:00:00 UTC, January 1, 1970.
If the value represented by this instance is negative, it is then
interpreted as a number of milliseconds before the Unix Epoch.
Exceptions
Type | Condition |
---|---|
OverflowException | If the given number of milliseconds produces a TimeSpan value less than MinValue or greater than MaxValue. |
ArgumentOutOfRangeException | If the resulting DateTime value is less than MinValue or greater than MaxValue |