Click or drag to resize
DateTime Methods

The DateTime type exposes the following members.

Methods
  NameDescription
Public methodAddDays
Returns a new DateTime that adds the specified number of days to the value of this instance.
Public methodEquals(DateTime)
Returns a value indicating whether the value of this instance is equal to the value of the specified DateTime instance.
Public methodEquals(Object)
Returns a value indicating whether this instance is equal to a specified object.
(Overrides ValueTypeEquals(Object).)
Public methodStatic memberEquals(DateTime, DateTime)
Returns a value indicating whether two DateTime instances have the same date and time value.
Public methodGetHashCode
Returns the hash code for this instance.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberParse(String)
Converts the specified string representation of a date and time to its DateTime equivalent.
Public methodStatic memberParse(String, IFormatProvider)
Converts the specified string representation of a date and time to its DateTime equivalent using the specified culture-specific format information.
Public methodStatic memberParse(String, IFormatProvider, DateTimeStyles)
Converts the specified string representation of a date and time to its DateTime equivalent using the specified culture-specific format information and formatting style.
Public methodToString
Converts the value of the current DateTime object to its equivalent string representation.
(Overrides ValueTypeToString.)
Public methodToString(IFormatProvider)
Converts the value of the current DateTime object to its equivalent string representation using the specified culture-specific format information.
Public methodToString(String)
Converts the value of the current DateTime object to its equivalent string representation using the specified format.
Public methodToString(String, IFormatProvider)
Converts the value of the current DateTime object to its equivalent string representation using the specified format and culture-specific format information.
Public methodToUniversalTime
Converts the value of the current DateTime object to Coordinated Universal Time (UTC).
Public methodStatic memberTryParse(String, DateTime)
Converts the specified string representation of a date and time to its DateTime equivalent and returns a value that indicates whether the conversion succeeded.
Public methodStatic memberTryParse(String, IFormatProvider, DateTimeStyles, DateTime)
Converts the specified string representation of a date and time to its DateTime equivalent using the specified culture-specific format information and formatting style, and returns a value that indicates whether the conversion succeeded.
Top
See Also