Il contenuto non è disponibile nella lingua di destinazione, ma solo in inglese.

DateTime.FromFileTimeUtc Method

Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.

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
public static DateTime FromFileTimeUtc(
 long fileTime
public: static DateTime FromFileTimeUtc(
 __int64 fileTime
public static function FromFileTimeUtc(
   fileTime : long
) : DateTime;


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).


Exception Type Condition
ArgumentOutOfRangeException fileTime is less than 0.


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.


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