CSharp examples for System:DateTime Day
Get start time of tomorrows day
using System.Globalization; using System;// ww w . java2s .c o m public class Main{ #region Tomorrow & Yesterday /// <summary> /// Get start time of tomorrows day /// </summary> public static DateTime Tomorrow(this DateTime dateTime) { return dateTime.AddDays(1).StartOfDay(); } /// <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; } }