时间差值

  DateTime d1 = DateTime.Parse("2006-06-07");  DateTime d2 = DateTime.Parse("2006-06-11");

  System.TimeSpan ND = d2 - d1;
  int n = ND.Days; //天数差
  int hn = ND.Hours; //小时差

posted on 2008-10-21 16:28  tarzon  阅读(267)  评论(0编辑  收藏  举报

导航