CSharp examples for System:DateTime Day
Last tick of the day.
using System;//from w w w . j a va 2 s . co m public class Main{ /// <summary> /// Last tick of the day. /// </summary> /// <param name="date">The date.</param> /// <returns></returns> public static DateTime DayMax(this DateTime date) { return date.Date.AddDays(1).AddTicks(-1); // last tick of this day } }