CSharp examples for System:DateTime Hour
Trim Hours
using System.Threading.Tasks; using System.Text; using System.Linq; using System.Collections.Generic; using System;/* w w w .j ava2s . co m*/ public class Main{ public static DateTime TrimHours(this DateTime d) { return new DateTime(d.Year, d.Month, d.Day, 0, 0, 0, 0); } }