DateTime.FromFileTimeUtc Method
Returns a DateTime equivalent to the specified operating system file timestamp, adjusted to coordinated universal time (UTC).
[Visual Basic] Public Shared Function FromFileTimeUtc( _ ByVal fileTime As Long _ ) As DateTime [C#] public static DateTime FromFileTimeUtc( long fileTime ); [C++] public: static DateTime FromFileTimeUtc( __int64 fileTime ); [JScript] public static function FromFileTimeUtc( fileTime : long ) : DateTime;
Parameters
- fileTime
- A Windows file time expressed in ticks.
Return Value
A DateTime value representing the date and time of fileTime, adjusted to coordinated universal time (UTC).
Exceptions
| Exception Type | Condition |
|---|---|
| ArgumentOutOfRangeException | fileTime is less than 0. |
Remarks
fileTime 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 FromFileTimeUtc method returns fileTime relative to January 1, 1 A.D. (C.E.) 12:00 A.M.
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 | ToUniversalTime | GetUtcOffset | FromFileTime