BeginningOfTheDay
Returns datetime corresponding to day beginning
Source
public static DateTime BeginningOfTheDay(this DateTime date)
{
return new DateTime(date.Year, date.Month, date.Day);
}
Example
var beginningOfTheDay = DateTime.Now.BeginningOfTheDay();