w3resource logo
C# Sharp Programming Exercises

C# Sharp Exercises: Windows file time to an equivalent UTC time

C# Sharp DateTime: Exercise-23 with Solution

Write a C# Sharp Program to convert the specified Windows file time to an equivalent UTC time.

Sample Solution:-

C# Sharp Code:

using System;
public class Example23
{
  public static void Main(String[] argv){  
    DateTime dt = DateTime.FromFileTimeUtc(12123123123123123);
    System.Console.WriteLine(dt);
  }
}

Sample Output:

6/2/1639 9:25:12 AM 

C# Sharp Code Editor:

using System;
public class Example23
{
  public static void Main(String[] argv){  
    DateTime dt = DateTime.FromFileTimeUtc(12123123123123123);
    System.Console.WriteLine(dt);
  }
}

Improve this sample solution and post your code through Disqus