CSharp examples for System:DateTime Day
End Of Day
using System.Collections.Generic; using System;/*from w w w .j av a 2 s .co m*/ public class Main{ public static DateTime EndOfDay(this DateTime? date) { return !date.HasValue ? DateTime.MinValue : date.Value.EndOfDay(); } public static DateTime EndOfDay(this DateTime date) { return date.Date.AddDays(1).Date.AddSeconds(-1); } }