DateTimeOffset Greater Than Operator : DateTimeOffset Calculation « Date Time « C# / C Sharp






DateTimeOffset Greater Than Operator

DateTimeOffset Greater Than Operator
  

using System;
using System.Globalization;
public class Test
{
   public static void Main()
   {
        DateTimeOffset date1 = new DateTimeOffset(2007, 6, 3, 14, 45, 0, new TimeSpan(-7, 0, 0));
        DateTimeOffset date2 = new DateTimeOffset(2007, 6, 3, 15, 45, 0, new TimeSpan(-6, 0, 0));
        DateTimeOffset date3 = new DateTimeOffset(date1.DateTime, new TimeSpan(-6, 0, 0));
        Console.WriteLine(date1 > date2);        
        Console.WriteLine(date1 > date3);        
        
   }
}

   
    
  








Related examples in the same category

1.Adds a specified time interval to a DateTimeOffset object.
2.Adds a specified number of whole and fractional days to the current DateTimeOffset object.
3.Add one week to the current date
4.Adds a specified number of whole and fractional hours to the current DateTimeOffset object.
5.Adds a specified number of months to the current DateTimeOffset object.
6.Adds a specified number of years to the DateTimeOffset object.
7.DateTimeOffset Greater Than Or Equal OperatorDateTimeOffset Greater Than Or Equal Operator
8.DateTimeOffset Inequality OperatorDateTimeOffset Inequality Operator
9.DateTimeOffset LessThan OperatorDateTimeOffset LessThan Operator
10.DateTimeOffset Less Than Or Equal OperatorDateTimeOffset Less Than Or Equal Operator
11.Subtracts a DateTimeOffset from another DateTimeOffsetSubtracts a DateTimeOffset from another DateTimeOffset
12.Subtracts a time interval from DateTimeOffsetSubtracts a time interval from DateTimeOffset
13.Converts DateTimeOffset to local time.Converts DateTimeOffset to local time.
14.Gets a DateTime value that represents the Coordinated Universal Time (UTC) date and time from DateTimeOffset