CSharp examples for System:DateTime Second
Trim Seconds And Milliseconds
using System.Text; using System.Linq; using System.Collections.Generic; using System;/*from w ww .j a va 2 s .c om*/ public class Main{ public static DateTime TrimSecondsAndMilliseconds(this DateTime self) { var dt = new DateTime(self.Year, self.Month, self.Day, self.Hour, self.Minute, 0, 0); dt = DateTime.SpecifyKind(dt, self.Kind); return dt; } }