日期相减

DateTime dt1 = new DateTime(2012, 2, 16);
        DateTime dt2 = new DateTime(2011, 1, 16);
        System.TimeSpan span = dt1- dt2;
        int day = span.Days;

posted @ 2013-06-08 15:31  蓝晓  阅读(167)  评论(0编辑  收藏  举报