Create DateTime from number of ticks at Coordinated Universal Time (UTC) or local time in CSharp
Description
The following code shows how to create DateTime from number of ticks at Coordinated Universal Time (UTC) or local time.
Example
/*from w w w .jav a 2 s.co m*/
using System;
using System.Globalization;
class Sample
{
public static void Main()
{
DateTime dt1 = new DateTime(111111111,DateTimeKind.Unspecified);
Console.WriteLine(dt1);
}
}
The code above generates the following result.