public static SqlBoolean LessThanOrEqual(SqlDateTime x, SqlDateTime y)
 {
     return (x <= y);
 }
 public static SqlBoolean NotEquals(SqlDateTime x, SqlDateTime y)
 {
     return (x != y);
 }
 public static SqlBoolean GreaterThanOrEqual(SqlDateTime x, SqlDateTime y)
 {
     return (x >= y);
 }
 public static SqlBoolean LessThan(SqlDateTime x, SqlDateTime y)
 {
     return (x < y);
 }
 public static SqlBoolean GreaterThan(SqlDateTime x, SqlDateTime y)
 {
     return (x > y);
 }
 public static SqlDateTime Subtract(SqlDateTime x, TimeSpan t)
 {
     return (x - t);
 }
 public static SqlDateTime Add(SqlDateTime x, TimeSpan t)
 {
     return (x + t);
 }
 public int CompareTo(SqlDateTime value)
 {
     if (value.IsNull)
     {
         return 1;
     }
     else
     {
         return this.value.CompareTo(value.Value);
     }
 }
 private static void CheckRange(SqlDateTime target)
 {
     if (target.IsNull)
     {
         return;
     }
     if (target.value > MaxValue.value || target.value < MinValue.value)
     {
         throw new SqlTypeException(
             String.Format("SqlDateTime overflow. Must be between {0} and {1}. Value was {2}", MinValue.Value,
                           MaxValue.Value, target.value));
     }
 }