CSharp examples for System:DateTime Day
Returns the FIRST possible time unit for provided DAY in dateTime (Same as DateTime.Date)
using System.Globalization; using System;//from w ww . j a va 2 s.c o m public class Main{ /// <summary> /// Returns the FIRST possible time unit for provided DAY in dateTime /// (Same as DateTime.Date) /// </summary> public static DateTime StartOfDay(this DateTime dateTime) { return dateTime.Date; } }