CSharp examples for System:DateTime Second
Gets the number of milliseconds needed to represent the DateTimeOffset.
// Copyright (C) 2006-2015 Esper Team. All rights reserved. / using System.Text.RegularExpressions; using System.Globalization; using System;/* w ww.jav a 2 s .co m*/ public class Main{ /// <summary> /// Gets the number of milliseconds needed to represent /// the datetime. /// </summary> /// <param name="dateTime">The date time.</param> /// <returns></returns> public static long InMillis(this DateTimeOffset dateTime) { return DateTimeHelper.TicksToMillis(dateTime.UtcTicks) - DateTimeConstants.Boundary; } }