DateTime.ToFileTimeUtc Method
Converts the value of this instance to the format of operating system file time, ignoring the local time zone.
[Visual Basic] Public Function ToFileTimeUtc() As Long [C#] public long ToFileTimeUtc(); [C++] public: __int64 ToFileTimeUtc(); [JScript] public function ToFileTimeUtc() : long;
Return Value
The value of this DateTime in the format of an operating system file time. The file time is not offset to account for the local time zone.
Exceptions
| Exception Type | Condition |
|---|---|
| ArgumentOutOfRangeException | The resulting file time would be less than 0. |
Remarks
The file time is a 64-bit signed integer value representing a Windows file timestamp. The timestamp is the number of 100-nanosecond intervals that have elapsed since January 1, 1601 A.D. (C.E.) 12:00 A.M. coordinated universal time (UTC). The ToFileTimeUtc method returns the value of this DateTime relative to January 1, 1601 A.D. (C.E.) 12:00 A.M., but does not adjust the file time to account for the local time zone.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework
See Also
DateTime Structure | DateTime Members | System Namespace | ToFileTime | Int64 | ToUniversalTime | GetUtcOffset