Get end of day in C#
By [)ia6l0 iii
Extension method to get the end of a day
public static DateTime GetEndOfDay(this DateTime date)
{
return date.Date.AddSeconds(86399);
}
The above method returns the end of the day, given a date
Related FAQs
Extension method to get the start of a day
Extension method to get the elasped time
Get end of day in C# (3672 Views)