BeginningOfTheDay

public static DateTime BeginningOfTheDay(this DateTime date)
{
	return new DateTime(date.Year, date.Month, date.Day);
}
Example:
var beginningOfTheDay = DateTime.Now.BeginningOfTheDay();

Description

Returns datetime corresponding to day beginning

Details

Double click on the code to select all.

 

;