Subtracts a DateTimeOffset from another DateTimeOffset
using System;
using System.Globalization;
public class Test
{
public static void Main()
{
DateTimeOffset offsetDate = new DateTimeOffset(2010, 12, 3, 11, 30, 0, new TimeSpan(-8, 0, 0));
TimeSpan duration = new TimeSpan(7, 18, 0, 0);
Console.WriteLine(offsetDate.Subtract(duration).ToString());
}
}
Related examples in the same category