Share via


Date Struct

Definition

Date type for Edm.Date

public struct Date : IComparable, IComparable<Microsoft.OData.Edm.Date>, IEquatable<Microsoft.OData.Edm.Date>
type Date = struct
Public Structure Date
Implements IComparable, IComparable(Of Date), IEquatable(Of Date)
Inheritance
Date
Implements

Constructors

Date(Int32, Int32, Int32)

Constructor of Date

Fields

MaxValue

Max value of Date

MinValue

Min value of Date

Properties

Day

Gets the day of the month represented by this instance.

Month

Gets the month component of the date represented by this instance.

Now

Gets a Date object that is set to current date on this computer, expressed as the local time.

Year

Gets the year component of the date represented by this instance.

Methods

AddDays(Int32)

Returns a new Date that adds the specified number of days to the value of this instance.

AddMonths(Int32)

Returns a new Date that adds the specified number of months to the value of this instance.

AddYears(Int32)

Returns a new Date that adds the specified number of years to the value of this instance.

CompareTo(Date)

Compares the value of this instance to a specified Date value and returns an integer that indicates whether this instance is earlier than, the same as, or later than the specified Date value.

CompareTo(Object)

Compares the value of this instance to a object value and returns an integer that indicates whether this instance is earlier than, the same as, or later than the object if it is a Date.

Equals(Date)

Compares the value of this instance to a specified Date value and returns an bool that indicates whether this instance is same as the specified Date value.

Equals(Object)

Compares the value of this instance to a specified object value and returns an bool that indicates whether the specified object is Date and this instance is same as the specified Date value.

GetHashCode()

Returns the hash code for this instance.

Parse(String, IFormatProvider)

Converts a specified string representation of a date to Date.

Parse(String)

Converts a specified string representation of a date to Date with CurrentCulture format.

ToString()

Convert Date to String

TryParse(String, Date)

Try converts a specified string representation of a date to Date with CurrentCulture format.

TryParse(String, IFormatProvider, Date)

Try converts a specified string representation of a date to Date

Operators

Equality(Date, Date)

Determines whether two specified instances of Date are equal.

GreaterThan(Date, Date)

Determines whether one specified Date is greater than another specified Date

GreaterThanOrEqual(Date, Date)

Determines whether one specified Date is greater equal to another specified Date

Implicit(Date to DateTime)

Convert Date to Clr DateTime

Implicit(DateTime to Date)

Convert Clr DateTime to Date

Inequality(Date, Date)

Determines whether two specified instances of Date are not equal.

LessThan(Date, Date)

Determines whether one specified Date is less than another specified Date

LessThanOrEqual(Date, Date)

Determines whether one specified Date is less equal to another specified Date

Applies to