use the ToFileTime() method to convert a DateTime to an operating system file timestamp
using System; class MainClass { public static void Main() { DateTime myDateTime10 = new DateTime(2004, 1, 15, 23, 2, 5); long myFileTime = myDateTime10.ToFileTime(); Console.WriteLine("myDateTime10.ToFileTime() = " + myDateTime10.ToFileTime()); } }