DateTime Methods
.NET Framework 3.0
| Name | Description | |
|---|---|---|
| Add | Adds the value of the specified TimeSpan to the value of this instance. |
| AddDays | Adds the specified number of days to the value of this instance. |
| AddHours | Adds the specified number of hours to the value of this instance. |
| AddMilliseconds | Adds the specified number of milliseconds to the value of this instance. |
| AddMinutes | Adds the specified number of minutes to the value of this instance. |
| AddMonths | Adds the specified number of months to the value of this instance. |
| AddSeconds | Adds the specified number of seconds to the value of this instance. |
| AddTicks | Adds the specified number of ticks to the value of this instance. |
| AddYears | Adds the specified number of years to the value of this instance. |
| Compare | Compares two instances of DateTime and returns an integer that indicates whether the first instance is earlier than, the same as, or later than the second instance. |
| CompareTo | Overloaded. Compares the value of this instance to a specified DateTime value and indicates whether this instance is earlier than, the same as, or later than the specified DateTime value. |
| DaysInMonth | Returns the number of days in the specified month and year. |
| Equals | Overloaded. Returns a value indicating whether two DateTime objects, or a DateTime instance and another object or DateTime are equal. |
| FromBinary | Deserializes a 64-bit binary value and recreates an original serialized DateTime object. |
| FromFileTime | Converts the specified Windows file time to an equivalent local time. |
| FromFileTimeUtc | Converts the specified Windows file time to an equivalent UTC time. |
| FromOADate | Returns a DateTime equivalent to the specified OLE Automation Date. |
| GetDateTimeFormats | Overloaded. Converts the value of this instance to all the string representations supported by the standard DateTime format specifiers. |
| GetHashCode | Overridden. Returns the hash code for this instance. |
| GetType | Gets the Type of the current instance. (inherited from Object) |
| GetTypeCode | Returns the TypeCode for value type DateTime. |
| IsDaylightSavingTime | Indicates whether this instance of DateTime is within the Daylight Saving Time range for the current time zone. |
| IsLeapYear | Returns an indication whether the specified year is a leap year. |
| op_Addition | Adds a specified time interval to a specified date and time, yielding a new date and time. |
| op_Equality | Determines whether two specified instances of DateTime are equal. |
| op_GreaterThan | Determines whether one specified DateTime is greater than another specified DateTime. |
| op_GreaterThanOrEqual | Determines whether one specified DateTime is greater than or equal to another specified DateTime. |
| op_Inequality | Determines whether two specified instances of DateTime are not equal. |
| op_LessThan | Determines whether one specified DateTime is less than another specified DateTime. |
| op_LessThanOrEqual | Determines whether one specified DateTime is less than or equal to another specified DateTime. |
| op_Subtraction | Overloaded. Subtracts a specified DateTime or TimeSpan from a specified DateTime. |
| Parse | Overloaded. Converts the specified string representation of a date and time to its DateTime equivalent. |
| ParseExact | Overloaded. Converts the specified string representation of a date and time to its DateTime equivalent. The format of the string representation must match a specified format exactly. |
| ReferenceEquals | Determines whether the specified Object instances are the same instance. (inherited from Object) |
| SpecifyKind | Creates a new DateTime object that represents the same time as the specified DateTime, but is designated in either local time, Coordinated Universal Time (UTC), or neither, as indicated by the specified DateTimeKind value. |
| Subtract | Overloaded. Subtracts the specified time or duration from this instance. |
| ToBinary | Serializes the current DateTime object to a 64-bit binary value that subsequently can be used to recreate the DateTime object. |
| ToFileTime | Converts the value of the current DateTime object to a Windows file time. |
| ToFileTimeUtc | Converts the value of the current DateTime object to a Windows file time. |
| ToLocalTime | Converts the value of the current DateTime object to local time. |
| ToLongDateString | Converts the value of the current DateTime object to its equivalent long date string representation. |
| ToLongTimeString | Converts the value of the current DateTime object to its equivalent long time string representation. |
| ToOADate | Converts the value of this instance to the equivalent OLE Automation date. |
| ToShortDateString | Converts the value of the current DateTime object to its equivalent short date string representation. |
| ToShortTimeString | Converts the value of the current DateTime object to its equivalent short time string representation. |
| ToString | Overloaded. Overridden. Converts the value of the current DateTime object to its equivalent string representation. |
| ToUniversalTime | Converts the value of the current DateTime object to Coordinated Universal Time (UTC). |
| TryParse | Overloaded. Converts the specified string representation of a date and time to its DateTime equivalent. |
| TryParseExact | Overloaded. Converts the specified string representation of a date and time to its DateTime equivalent. The format of the string representation must match a specified format exactly. |
Top
Community Additions
ADD
Show: