CSharp examples for System:DateTime Second
Trim Seconds
using System.Threading.Tasks; using System.Text; using System.Linq; using System.Collections.Generic; using System;//w ww . j a v a 2s. co m public class Main{ public static DateTime TrimSeconds(this DateTime d) { return new DateTime(d.Year, d.Month, d.Day, d.Hour, d.Minute, 0, 0); } }