I want to store dates as numbers in a table. I know how to do that but I don\'t know how to go back. How can I cast a long variable to ToDateTime.
DateTime n
long dateTime = DateTime.Now.Ticks; Console.WriteLine(dateTime); Console.WriteLine(new DateTime(dateTime)); Console.ReadKey();