CSharp examples for System:DateTime Second
Trim Milliseconds
using System.Text; using System.Linq; using System.Collections.Generic; using System;//from w ww. j a v a 2 s.c o m public class Main{ public static DateTime TrimMilliseconds(this DateTime self) { var dt = new DateTime(self.Year, self.Month, self.Day, self.Hour, self.Minute, self.Second, self.Kind); return dt; } }