Loading

GetEndOfTheDay 获取一天中最大的时间

        public DateTime GetEndOfTheDayInMinute(DateTime dt)
        {
            return GetEndOfTheDay(dt).AddSeconds(-59);
        }
        public DateTime GetEndOfTheDayInSecond(DateTime dt)
        {
            return GetEndOfTheDay(dt).AddMilliseconds(-999);
        }
        public DateTime GetEndOfTheDayInMillisecond(DateTime dt)
        {
            return GetEndOfTheDay(dt).AddTicks(-9999999);
        }
        public DateTime GetEndOfTheDay(DateTime dt)
        {
            return dt.Date.AddDays(1).AddTicks(-1);
        }
posted @ 2012-02-09 12:17  today4king  阅读(324)  评论(0编辑  收藏  举报