Export (0) Print
Expand All

DateTime Methods

The DateTime type exposes the following members.

  NameDescription
Public method Supported by the .NET Compact Framework Supported by the XNA Framework Add Returns a new DateTime that adds the value of the specified TimeSpan to the value of this instance.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework AddDays Returns a new DateTime that adds the specified number of days to the value of this instance.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework AddHours Returns a new DateTime that adds the specified number of hours to the value of this instance.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework AddMilliseconds Returns a new DateTime that adds the specified number of milliseconds to the value of this instance.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework AddMinutes Returns a new DateTime that adds the specified number of minutes to the value of this instance.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework AddMonths Returns a new DateTime that adds the specified number of months to the value of this instance.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework AddSeconds Returns a new DateTime that adds the specified number of seconds to the value of this instance.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework AddTicks Returns a new DateTime that adds the specified number of ticks to the value of this instance.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework AddYears Returns a new DateTime that adds the specified number of years to the value of this instance.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework 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.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework 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.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework DaysInMonth Returns the number of days in the specified month and year.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework Equals Overloaded. Returns a value indicating whether two DateTime objects, or a DateTime instance and another object or DateTime are equal.
Protected method Supported by the .NET Compact Framework Supported by the XNA Framework Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method Static member FromBinary Deserializes a 64-bit binary value and recreates an original serialized DateTime object.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework FromFileTime Converts the specified Windows file time to an equivalent local time.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework FromFileTimeUtc Converts the specified Windows file time to an equivalent UTC time.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework FromOADate Returns a DateTime equivalent to the specified OLE Automation date.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework GetDateTimeFormats Overloaded. Converts the value of this instance to all the string representations supported by the standard date and time format specifiers.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework GetHashCode Returns the hash code for this instance. (Overrides ValueType.GetHashCode().)
Public method Supported by the .NET Compact Framework Supported by the XNA Framework GetType Gets the type of the current instance. (Inherited from Object.)
Public method Supported by the .NET Compact Framework Supported by the XNA Framework GetTypeCode Returns the TypeCode for value type DateTime.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework IsDaylightSavingTime Indicates whether this instance of DateTime is within the Daylight Saving Time range for the current time zone.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework IsLeapYear Returns an indication whether the specified year is a leap year.
Protected method Supported by the .NET Compact Framework Supported by the XNA Framework MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework Parse Overloaded. Converts the specified string representation of a date and time to its DateTime equivalent.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework 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 or an exception is thrown.
Public method Static member Supported by the .NET Compact Framework Supported by the XNA Framework SpecifyKind Creates a new DateTime object that has the same number of ticks as the specified DateTime, but is designated as either local time, Coordinated Universal Time (UTC), or neither, as indicated by the specified DateTimeKind value.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework Subtract Overloaded. Subtracts the specified time or duration from this instance.
Public method ToBinary Serializes the current DateTime object to a 64-bit binary value that subsequently can be used to recreate the DateTime object.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework ToFileTime Converts the value of the current DateTime object to a Windows file time.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework ToFileTimeUtc Converts the value of the current DateTime object to a Windows file time.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework ToLocalTime Converts the value of the current DateTime object to local time.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework ToLongDateString Converts the value of the current DateTime object to its equivalent long date string representation.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework ToLongTimeString Converts the value of the current DateTime object to its equivalent long time string representation.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework ToOADate Converts the value of this instance to the equivalent OLE Automation date.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework ToShortDateString Converts the value of the current DateTime object to its equivalent short date string representation.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework ToShortTimeString Converts the value of the current DateTime object to its equivalent short time string representation.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework ToString Overloaded. Converts the value of the current DateTime object to its equivalent string representation.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework ToUniversalTime Converts the value of the current DateTime object to Coordinated Universal Time (UTC).
Public method Static member TryParse Overloaded. 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 method Static member 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. The method returns a value that indicates whether the conversion succeeded.
Top

  NameDescription
Explicit interface implemetation Private method ISerializable.GetObjectData Populates a SerializationInfo object with the data needed to serialize the current DateTime object.
Explicit interface implemetation Private method Supported by the .NET Compact Framework Supported by the XNA Framework IConvertible.ToBoolean Infrastructure. This conversion is not supported. Attempting to use this method throws an InvalidCastException.
Explicit interface implemetation Private method Supported by the .NET Compact Framework Supported by the XNA Framework IConvertible.ToByte Infrastructure. This conversion is not supported. Attempting to use this method throws an InvalidCastException.
Explicit interface implemetation Private method Supported by the .NET Compact Framework Supported by the XNA Framework IConvertible.ToChar Infrastructure. This conversion is not supported. Attempting to use this method throws an InvalidCastException.
Explicit interface implemetation Private method Supported by the .NET Compact Framework Supported by the XNA Framework IConvertible.ToDateTime Infrastructure. Returns the current DateTime object.
Explicit interface implemetation Private method Supported by the .NET Compact Framework Supported by the XNA Framework IConvertible.ToDecimal Infrastructure. This conversion is not supported. Attempting to use this method throws an InvalidCastException.
Explicit interface implemetation Private method Supported by the .NET Compact Framework Supported by the XNA Framework IConvertible.ToDouble Infrastructure. This conversion is not supported. Attempting to use this method throws an InvalidCastException.
Explicit interface implemetation Private method Supported by the .NET Compact Framework Supported by the XNA Framework IConvertible.ToInt16 Infrastructure. This conversion is not supported. Attempting to use this method throws an InvalidCastException.
Explicit interface implemetation Private method Supported by the .NET Compact Framework Supported by the XNA Framework IConvertible.ToInt32 Infrastructure. This conversion is not supported. Attempting to use this method throws an InvalidCastException.
Explicit interface implemetation Private method Supported by the .NET Compact Framework Supported by the XNA Framework IConvertible.ToInt64 Infrastructure. This conversion is not supported. Attempting to use this method throws an InvalidCastException.
Explicit interface implemetation Private method Supported by the .NET Compact Framework Supported by the XNA Framework IConvertible.ToSByte Infrastructure. This conversion is not supported. Attempting to use this method throws an InvalidCastException.
Explicit interface implemetation Private method Supported by the .NET Compact Framework Supported by the XNA Framework IConvertible.ToSingle Infrastructure. This conversion is not supported. Attempting to use this method throws an InvalidCastException.
Explicit interface implemetation Private method Supported by the .NET Compact Framework Supported by the XNA Framework IConvertible.ToType Infrastructure. Converts the current DateTime object to an object of a specified type.
Explicit interface implemetation Private method Supported by the .NET Compact Framework Supported by the XNA Framework IConvertible.ToUInt16 Infrastructure. This conversion is not supported. Attempting to use this method throws an InvalidCastException.
Explicit interface implemetation Private method Supported by the .NET Compact Framework Supported by the XNA Framework IConvertible.ToUInt32 Infrastructure. This conversion is not supported. Attempting to use this method throws an InvalidCastException.
Explicit interface implemetation Private method Supported by the .NET Compact Framework Supported by the XNA Framework IConvertible.ToUInt64 Infrastructure. This conversion is not supported. Attempting to use this method throws an InvalidCastException.
Top

Community Additions

ADD
Show:
© 2014 Microsoft