NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DateTime Methods

The methods of the DateTime structure are listed below. For a complete list of DateTime structure members, see the DateTime Members topic.

Public:

Add Returns the DateTime result of adding this instance to a TimeSpan.
AddDays Returns the DateTime result of adding this instance to a fractional number of days.
AddHours Returns the DateTime result from adding this instance to a fractional number of hours.
AddMilliseconds Returns the DateTime result from adding this instance to the specified number of milliseconds.
AddMinutes Returns the DateTime result from adding this instance to a fractional number of minutes.
AddMonths Returns the DateTime result from adding this instance to the specified number of months.
AddSeconds Returns the DateTime result from adding this instance to a fractional number of seconds.
AddTicks Returns the DateTime result from adding this instance to the specified number of 100-nanosecond ticks.
AddYears Returns the DateTime result from adding this instance to the specified number of years.
Compare Compares two DateTime values.
CompareTo Compares this instance to a specified object.
DaysInMonth Returns the number of days in a month determined by the specified year and month.
Equals Overloaded. Determines whether this instance and as a specified time are the same.
Format Converts this DateTime to a String with the specified format string and IServiceObjectProvider.
FromFileTime Creates a DateTime from an Operating System file time.
FromOADate Creates a DateTime from an OLE Automation Date.
FromString Creates a DateTime from a String.
GetAllDateTimes Overloaded. OBSOLETE. Use GetDateTimeFormats instead.
GetDateTimeFormats Overloaded. Returns the DateTime format string.
GetHashCode Returns the hash code for this instance.
GetType (inherited from Object) Gets the Type of the Object.
GetTypeCode Returns the type code for this instance.
IsLeapYear Determines whether a specified year is a leap year.
Parse Overloaded. Creates a DateTime from a String.
ParseExact Overloaded. Creates a DateTime from a string.
Subtract Overloaded. Subtracts a number from this DateTime.
ToBoolean Converts this instance to a Boolean value
ToByte Converts this instance to a Byte value
ToChar Converts this instance to a Char value
ToDateTime Converts this instance to a DateTime value
ToDecimal Converts this instance to a Decimal value
ToDouble Converts this instance to a Double value
ToFileTime Converts the value of this DateTime to the format of the local system file time.
ToInt16 Converts this instance into an Int16.
ToInt32 Converts this instance into an Int32.
ToInt64 Converts this instance into an Int64.
ToLocalTime Converts UTC to local time.
ToLongDateString Converts the date value of this instance to a String.
ToLongTimeString Converts the time value of this instance to a String.
ToOADate Converts the DateTime instance into an OLE Automation compatible date.
ToSByte Converts this instance to an SByte.
ToShortDateString Converts the date value of this instance to a String.
ToShortTimeString Converts the time value of the instance to a String.
ToSingle Converts this instance into a Single.
ToString Overloaded. Converts the date and time value of this instance to a String.
ToType Converts this instance to a Type.
ToUInt16 Converts this instance to a UInt16.
ToUInt32 Converts this instance to a UInt32.
ToUInt64 Converts this instance to a UInt64.
ToUniversalTime Converts local time to UTC.

Protected:

Finalize (inherited from Object) Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by the Garbage Collector (GC). This method may be ignored by the runtime; therefore, necessary cleanup operations should be done elsewhere.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.

See Also

DateTime Structure | System Namespace