w3resource
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 

Flowchart:

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

C# Sharp Code Editor:

Improve this sample solution and post your code through Disqus

Previous: Write a C# Sharp program which shows that when a time that falls within this range is converted to a long integer value and is then restored and the original value is adjusted to become a valid time.
Next: Write a C# Sharp program to display the string representation of a date using all possible standard date and time formats in the computer's current culture (en-US.).

What is the difficulty level of this exercise?



New Content: Composer: Dependency manager for PHP, R Programming