CSharp examples for System:DateTime Second
Change DateTime Seconds
using System.Collections.Generic; using System;/*from w ww. j a v a 2 s.com*/ public class Main{ public static DateTime ChangeSeconds(this DateTime dateTime, int seconds, int milliseconds) { return new DateTime( dateTime.Year, dateTime.Month, dateTime.Day, dateTime.Hour, dateTime.Minute, seconds, milliseconds, dateTime.Kind); } }