DateTimeOffset Members
.NET Framework 3.5
Represents a point in time, typically expressed as a date and time of day, relative to Coordinated Universal Time (UTC).
The DateTimeOffset type exposes the following members.
| Name | Description | |
|---|---|---|
|
DateTimeOffset | Overloaded. Initializes a new instance of the DateTimeOffset structure. |
| Name | Description | |
|---|---|---|
|
Add | Adds a specified time interval to a DateTimeOffset object. |
|
AddDays | Adds a specified number of whole and fractional days to the current DateTimeOffset object. |
|
AddHours | Adds a specified number of whole and fractional hours to the current DateTimeOffset object. |
|
AddMilliseconds | Adds a specified number of milliseconds to the current DateTimeOffset object. |
|
AddMinutes | Adds a specified number of whole and fractional minutes to the current DateTimeOffset object. |
|
AddMonths | Adds a specified number of months to the current DateTimeOffset object. |
|
AddSeconds | Adds a specified number of whole and fractional seconds to the current DateTimeOffset object. |
|
AddTicks | Adds a specified number of ticks to the current DateTimeOffset object. |
|
AddYears | Adds a specified number of years to the DateTimeOffset object. |
|
Compare | Compares two DateTimeOffset objects and indicates whether the first is earlier than the second, equal to the second, or later than the second. |
|
CompareTo | Compares the current DateTimeOffset object to a specified DateTimeOffset object and indicates whether the current object is earlier than, the same as, or later than the second DateTimeOffset object. |
|
Equals | Overloaded. Determines whether two DateTimeOffset objects are equal, or a DateTimeOffset object is equal to a specified object. |
|
EqualsExact | Determines whether the current DateTimeOffset object represents the same time and has the same offset as a specified DateTimeOffset object. |
|
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
|
FromFileTime | Converts the specified Windows file time to an equivalent local time. |
|
GetHashCode | Returns the hash code for the current DateTimeOffset object. (Overrides ValueType.GetHashCode().) |
|
GetType | Gets the type of the current instance. (Inherited from Object.) |
|
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
|
Parse | Overloaded. Converts the specified string representation of a date and time to its DateTimeOffset equivalent. |
|
ParseExact | Overloaded. Converts the specified string representation of a date and time to its DateTimeOffset equivalent. The format of the string representation must match a specified format exactly. |
|
Subtract | Overloaded. Subtracts a specified time or duration from the current DateTimeOffset object. |
|
ToFileTime | Converts the value of the current DateTimeOffset object to a Windows file time. |
|
ToLocalTime | Converts the current DateTimeOffset object to a DateTimeOffset object that represents the local time. |
|
ToOffset | Converts the value of the current DateTimeOffset object to the date and time specified by an offset value. |
|
ToString | Overloaded. Converts the value of the current DateTimeOffset object to its equivalent string representation. |
|
ToUniversalTime | Converts the current DateTimeOffset object to a DateTimeOffset value that represents the Coordinated Universal Time (UTC). |
|
TryParse | Overloaded. Converts a specified string representation of a date and time to its DateTimeOffset equivalent. |
|
TryParseExact | Overloaded. Converts the specified string representation of a date and time to its DateTimeOffset equivalent. The format of the string representation must match a specified format exactly. |
| Name | Description | |
|---|---|---|
|
Addition | Adds a specified time interval to a DateTimeOffset object that has a specified date and time, and yields a DateTimeOffset object that has new a date and time. |
|
Equality | Determines whether two specified DateTimeOffset objects represent the same point in time. |
|
GreaterThan | Determines whether one specified DateTimeOffset object is greater than (or later than) a second specified DateTimeOffset object. |
|
GreaterThanOrEqual | Determines whether one specified DateTimeOffset object is greater than or equal to a second specified DateTimeOffset object. |
|
Implicit | Defines an implicit conversion of a DateTime object to a DateTimeOffset object. |
|
Inequality | Determines whether two specified DateTimeOffset objects refer to different points in time. |
|
LessThan | Determines whether one specified DateTimeOffset object is less than a second specified DateTimeOffset object. |
|
LessThanOrEqual | Determines whether one specified DateTimeOffset object is less than a second specified DateTimeOffset object. |
|
Subtraction | Overloaded. Subtracts a specified DateTimeOffset or TimeSpan object from a DateTimeOffset object. |
| Name | Description | |
|---|---|---|
|
MaxValue | Represents the greatest possible value of DateTimeOffset. This field is read-only. |
|
MinValue | Represents the earliest possible DateTimeOffset value. This field is read-only. |
| Name | Description | |
|---|---|---|
|
Date | Gets a DateTime value that represents the date component of the current DateTimeOffset object. |
|
DateTime | Gets a DateTime value that represents the date and time of the current DateTimeOffset object. |
|
Day | Gets the day of the month represented by the current DateTimeOffset object. |
|
DayOfWeek | Gets the day of the week represented by the current DateTimeOffset object. |
|
DayOfYear | Gets the day of the year represented by the current DateTimeOffset object. |
|
Hour | Gets the hour component of the time represented by the current DateTimeOffset object. |
|
LocalDateTime | Gets a DateTime value that represents the local date and time of the current DateTimeOffset object. |
|
Millisecond | Gets the millisecond component of the time represented by the current DateTimeOffset object. |
|
Minute | Gets the minute component of the time represented by the current DateTimeOffset object. |
|
Month | Gets the month component of the date represented by the current DateTimeOffset object. |
|
Now | Gets a DateTimeOffset object that is set to the current date and time on the current computer, with the offset set to the local time's offset from Coordinated Universal Time (UTC). |
|
Offset | Gets the time's offset from Coordinated Universal Time (UTC). |
|
Second | Gets the second component of the clock time represented by the current DateTimeOffset object. |
|
Ticks | Gets the number of ticks that represents the date and time of the current DateTimeOffset object in clock time. |
|
TimeOfDay | Gets the time of day for the current DateTimeOffset object. |
|
UtcDateTime | Gets a DateTime value that represents the Coordinated Universal Time (UTC) date and time of the current DateTimeOffset object. |
|
UtcNow | Gets a DateTimeOffset object whose date and time are set to the current Coordinated Universal Time (UTC) date and time and whose offset is TimeSpan.Zero. |
|
UtcTicks | Gets the number of ticks that represents the date and time of the current DateTimeOffset object in Coordinated Universal Time (UTC). |
|
Year | Gets the year component of the date represented by the current DateTimeOffset object. |
| Name | Description | |
|---|---|---|
|
IComparable.CompareTo | Infrastructure. Compares the value of the current DateTimeOffset object with another object of the same type. |
|
ISerializable.GetObjectData | Infrastructure. Populates a SerializationInfo object with the data required to serialize the current DateTimeOffset object. |
|
IDeserializationCallback.OnDeserialization | Infrastructure. Runs when the deserialization of an object has been completed. |