NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DateTime.ToFileTime

Converts the value of this DateTime to the format of the local system file time.

[Visual Basic]
Public Function ToFileTime() As Long
[C#]
public long ToFileTime();
[C++]
public: __int64 ToFileTime();
[JScript]
public function ToFileTime() : long;

Return Value

Returns the value of this DateTime in the format of the local system file time.

Exceptions

Exception Type Condition
ArgumentOutOfRangeException If this DateTime contains a value that cannot be converted to a system file time.

Remarks

A system file time is an unsigned 8-byte value representing the date and time as the number of 100-nanosecond intervals that have elapsed since 1/1/1601 12:00 AM.

Dates that are earlier than 01/01/1601 12:00:00 AM UTC cannot be converted to a local system file time value, and an exception will be thrown.

See Also

DateTime Structure | DateTime Members | System Namespace | Int64 | ToUniversalTime | System.DirectoryServices.IADsPropertyValue.UTCTime