- Console.WriteLine(DateTime.Now.ToUniversalTime().AddHours(8).ToShortTimeString());
- //TimeSpan
- DateTime t1 = new DateTime(1980,1,1,0,0,0);
- DateTime t2 = DateTime.Now;
- //int spent = new TimeSpan(t2.Ticks - t1.Ticks).Hours;
- TimeSpan ts = t2 - t1;
- Console.WriteLine(ts.Days);
沒有留言:
張貼留言