EndOfTheDay

public static DateTime EndOfTheDay(this DateTime date)
{
	return new DateTime(date.Year, date.Month, date.Day, 23, 59, 59, 999);
}
Example:
var endOfTheDay = DateTime.Now.EndOfTheDay();

Description

Returns datetime corresponding to day end

Details

Double click on the code to select all.

 

;