Export (0) Print
Expand All
15 out of 26 rated this helpful - Rate this topic

DateTime Members

Represents an instant in time, typically expressed as a date and time of day.

The following tables list the members exposed by the DateTime type.

  Name Description
Public method Supported by the .NET Compact Framework DateTime Overloaded. Initializes a new instance of the DateTime structure.
Top
  Name Description
Public field Static Supported by the .NET Compact Framework MaxValue Represents the largest possible value of DateTime. This field is read-only.
Public field Static Supported by the .NET Compact Framework MinValue Represents the smallest possible value of DateTime. This field is read-only.
Top
  Name Description
Public property Supported by the .NET Compact Framework Date Gets the date component of this instance.
Public property Supported by the .NET Compact Framework Day Gets the day of the month represented by this instance.
Public property Supported by the .NET Compact Framework DayOfWeek Gets the day of the week represented by this instance.
Public property Supported by the .NET Compact Framework DayOfYear Gets the day of the year represented by this instance.
Public property Supported by the .NET Compact Framework Hour Gets the hour component of the date represented by this instance.
Public property Supported by the .NET Compact Framework Kind Gets a value that indicates whether the time represented by this instance is based on local time, Coordinated Universal Time (UTC), or neither.
Public property Supported by the .NET Compact Framework Millisecond Gets the milliseconds component of the date represented by this instance.
Public property Supported by the .NET Compact Framework Minute Gets the minute component of the date represented by this instance.
Public property Supported by the .NET Compact Framework Month Gets the month component of the date represented by this instance.
Public property Static Supported by the .NET Compact Framework Now Gets a DateTime object that is set to the current date and time on this computer, expressed as the local time.
Public property Supported by the .NET Compact Framework Second Gets the seconds component of the date represented by this instance.
Public property Supported by the .NET Compact Framework Ticks Gets the number of ticks that represent the date and time of this instance.
Public property Supported by the .NET Compact Framework TimeOfDay Gets the time of day for this instance.
Public property Static Supported by the .NET Compact Framework Today Gets the current date.
Public property Static Supported by the .NET Compact Framework UtcNow Gets a DateTime object that is set to the current date and time on this computer, expressed as the Coordinated Universal Time (UTC).
Public property Supported by the .NET Compact Framework Year Gets the year component of the date represented by this instance.
Top
  Name Description
Public method Supported by the .NET Compact Framework Add Adds the value of the specified TimeSpan to the value of this instance.
Public method Supported by the .NET Compact Framework AddDays Adds the specified number of days to the value of this instance.
Public method Supported by the .NET Compact Framework AddHours Adds the specified number of hours to the value of this instance.
Public method Supported by the .NET Compact Framework AddMilliseconds Adds the specified number of milliseconds to the value of this instance.
Public method Supported by the .NET Compact Framework AddMinutes Adds the specified number of minutes to the value of this instance.
Public method Supported by the .NET Compact Framework AddMonths Adds the specified number of months to the value of this instance.
Public method Supported by the .NET Compact Framework AddSeconds Adds the specified number of seconds to the value of this instance.
Public method Supported by the .NET Compact Framework AddTicks Adds the specified number of ticks to the value of this instance.
Public method Supported by the .NET Compact Framework AddYears Adds the specified number of years to the value of this instance.
Public method Static Supported by the .NET Compact Framework Compare Compares two instances of DateTime and returns an indication of their relative values.
Public method Supported by the .NET Compact Framework CompareTo Overloaded. Compares this instance to a specified object or value type and returns an indication of their relative values.
Public method Static Supported by the .NET Compact Framework DaysInMonth Returns the number of days in the specified month and year.
Public method Supported by the .NET Compact Framework Equals Overloaded. Returns a value indicating whether two DateTime objects, or a DateTime instance and another object or DateTime are equal.
Public method Static FromBinary Deserializes a 64-bit binary value and recreates an original serialized DateTime object.
Public method Static Supported by the .NET Compact Framework FromFileTime Converts the specified Windows file time to an equivalent local time.
Public method Static Supported by the .NET Compact Framework FromFileTimeUtc Converts the specified Windows file time to an equivalent UTC time.
Public method Static Supported by the .NET Compact Framework FromOADate Returns a DateTime equivalent to the specified OLE Automation Date.
Public method Supported by the .NET Compact Framework GetDateTimeFormats Overloaded. Converts the value of this instance to all the string representations supported by the standard DateTime format specifiers.
Public method Supported by the .NET Compact Framework GetHashCode Overridden. Returns the hash code for this instance.
Public method Supported by the .NET Compact Framework GetType  Gets the Type of the current instance. (Inherited from Object.)
Public method Supported by the .NET Compact Framework GetTypeCode Returns the TypeCode for value type DateTime.
Public method Supported by the .NET Compact Framework IsDaylightSavingTime Indicates whether this instance of DateTime is within the Daylight Saving Time range for the current time zone.
Public method Static Supported by the .NET Compact Framework IsLeapYear Returns an indication whether the specified year is a leap year.
Public method Static Supported by the .NET Compact Framework op_Addition Adds a specified time interval to a specified date and time, yielding a new date and time.
Public method Static Supported by the .NET Compact Framework op_Equality Determines whether two specified instances of DateTime are equal.
Public method Static Supported by the .NET Compact Framework op_GreaterThan Determines whether one specified DateTime is greater than another specified DateTime.
Public method Static Supported by the .NET Compact Framework op_GreaterThanOrEqual Determines whether one specified DateTime is greater than or equal to another specified DateTime.
Public method Static Supported by the .NET Compact Framework op_Inequality Determines whether two specified instances of DateTime are not equal.
Public method Static Supported by the .NET Compact Framework op_LessThan Determines whether one specified DateTime is less than another specified DateTime.
Public method Static Supported by the .NET Compact Framework op_LessThanOrEqual Determines whether one specified DateTime is less than or equal to another specified DateTime.
Public method Static Supported by the .NET Compact Framework op_Subtraction Overloaded. Subtracts a specified DateTime or TimeSpan from a specified DateTime.
Public method Static Supported by the .NET Compact Framework Parse Overloaded. Converts the specified string representation of a date and time to its DateTime equivalent.
Public method Static Supported by the .NET Compact 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.
Public method Static Supported by the .NET Compact Framework ReferenceEquals  Determines whether the specified Object instances are the same instance. (Inherited from Object.)
Public method Static Supported by the .NET Compact Framework 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.
Public method Supported by the .NET Compact 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 ToFileTime Converts the value of the current DateTime object to a Windows file time.
Public method Supported by the .NET Compact Framework ToFileTimeUtc Converts the value of the current DateTime object to a Windows file time.
Public method Supported by the .NET Compact Framework ToLocalTime Converts the value of the current DateTime object to local time.
Public method Supported by the .NET Compact Framework ToLongDateString Converts the value of this instance to its equivalent long date string representation.
Public method Supported by the .NET Compact Framework ToLongTimeString Converts the value of this instance to its equivalent long time string representation.
Public method Supported by the .NET Compact Framework ToOADate Converts the value of this instance to the equivalent OLE Automation date.
Public method Supported by the .NET Compact Framework ToShortDateString Converts the value of this instance to its equivalent short date string representation.
Public method Supported by the .NET Compact Framework ToShortTimeString Converts the value of this instance to its equivalent short time string representation.
Public method Supported by the .NET Compact Framework ToString Overloaded. Overridden. Converts the value of this instance to its equivalent string representation.
Public method Supported by the .NET Compact Framework ToUniversalTime Converts the value of the current DateTime object to Coordinated Universal Time (UTC).
Public method Static TryParse Overloaded. Converts the specified string representation of a date and time to its DateTime equivalent.
Public method Static 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
  Name Description
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToBoolean This conversion is not supported. Attempting to do so throws an InvalidCastException.
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToByte This conversion is not supported. Attempting to do so throws an InvalidCastException.
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToChar This conversion is not supported. Attempting to do so throws an InvalidCastException.
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToDateTime Returns the current DateTime object.
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToDecimal This conversion is not supported. Attempting to do so throws an InvalidCastException.
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToDouble This conversion is not supported. Attempting to do so throws an InvalidCastException.
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToInt16 This conversion is not supported. Attempting to do so throws an InvalidCastException.
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToInt32 This conversion is not supported. Attempting to do so throws an InvalidCastException.
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToInt64 This conversion is not supported. Attempting to do so throws an InvalidCastException.
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToSByte This conversion is not supported. Attempting to do so throws an InvalidCastException.
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToSingle This conversion is not supported. Attempting to do so throws an InvalidCastException.
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToType Converts the current DateTime object to an object of a specified type.
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToUInt16 This conversion is not supported. Attempting to do so throws an InvalidCastException.
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToUInt32 This conversion is not supported. Attempting to do so throws an InvalidCastException.
Explicit interface implementation Method Supported by the .NET Compact Framework System.IConvertible.ToUInt64 This conversion is not supported. Attempting to do so throws an InvalidCastException.
Explicit interface implementation Method System.Runtime.Serialization.ISerializable.GetObjectData Populates a SerializationInfo object with the data needed to serialize the current DateTime object.
Top
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.