CSharp examples for System:DateTime Second
Get Align Seconds Date Time
using System.Globalization; using System.IO;/*www .j a v a 2 s . co m*/ using System; public class Main{ public static DateTime GetAlignSecondsDateTime(DateTime time, long alignSeconds) { long ticks = time.Ticks; ticks -= ticks % (10000 * 1000 * alignSeconds); DateTime dt = new DateTime(ticks); return dt; } }