C# DateTime FromFileTimeUtc
Description
DateTime FromFileTimeUtc
converts the specified Windows
file time to an equivalent UTC time.
Syntax
DateTime.FromFileTimeUtc
has the following syntax.
public static DateTime FromFileTimeUtc(
long fileTime
)
Parameters
DateTime.FromFileTimeUtc
has the following parameters.
fileTime
- A Windows file time expressed in ticks.
Returns
DateTime.FromFileTimeUtc
method returns An object that represents the UTC time equivalent of the date and time represented
by the fileTime parameter.
Example
Converts the specified Windows file time to an equivalent UTC time.
using System;/*ww w. ja va 2 s . co m*/
public class MainClass{
public static void Main(String[] argv){
DateTime dt = DateTime.FromFileTimeUtc(12123123123123123);
System.Console.WriteLine(dt);
}
}
The code above generates the following result.