CSharp examples for System:DateTime Calculate
Flooring DateTime
using System.Collections.Generic; using System;//from w w w.j av a 2 s.c o m public class Main{ public static DateTime Floor(this DateTime date, TimeSpan span) { long ticks = date.Ticks / span.Ticks; return new DateTime(ticks * span.Ticks); } }