Export (0) Print
Expand All

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 Supported by the XNA Framework DateTime Overloaded. Initializes a new instance of the DateTime structure.
Top

  Name Description
Public field Static Supported by the .NET Compact Framework Supported by the XNA Framework MaxValue Represents the largest possible value of DateTime. This field is read-only.
Public field Static Supported by the .NET Compact Framework Supported by the XNA 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 Supported by the XNA Framework Date Gets the date component of this instance.
Public property Supported by the .NET Compact Framework Supported by the XNA Framework Day Gets the day of the month represented by this instance.
Public property Supported by the .NET Compact Framework Supported by the XNA Framework DayOfWeek Gets the day of the week represented by this instance.
Public property Supported by the .NET Compact Framework Supported by the XNA Framework DayOfYear Gets the day of the year represented by this instance.
Public property Supported by the .NET Compact Framework Supported by the XNA Framework Hour Gets the hour component of the date represented by this instance.
Public property Supported by the .NET Compact Framework Supported by the XNA 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 Supported by the XNA Framework Millisecond Gets the milliseconds component of the date represented by this instance.
Public property Supported by the .NET Compact Framework Supported by the XNA Framework Minute Gets the minute component of the date represented by this instance.
Public property Supported by the .NET Compact Framework Supported by the XNA Framework Month Gets the month component of the date represented by this instance.
Public property Static Supported by the .NET Compact Framework Supported by the XNA 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 Supported by the XNA Framework Second Gets the seconds component of the date represented by this instance.
Public property Supported by the .NET Compact Framework Supported by the XNA Framework Ticks Gets the number of ticks that represent the date and time of this instance.
Public property Supported by the .NET Compact Framework Supported by the XNA Framework TimeOfDay Gets the time of day for this instance.
Public property Static Supported by the .NET Compact Framework Supported by the XNA Framework Today Gets the current date.
Public property Static Supported by the .NET Compact Framework Supported by the XNA 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 Supported by the XNA Framework Year Gets the year component of the date represented by this instance.
Top

  Name Description
Public method Supported by the .NET Compact Framework Supported by the XNA Framework Add 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 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 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 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 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 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 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 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 Adds the specified number of years to the value of this instance.
Public method Static 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 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 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.
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 Supported by the XNA Framework FromFileTime Converts the specified Windows file time to an equivalent local time.
Public method Static 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 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 DateTime format specifiers.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework GetHashCode Overridden. Returns the hash code for this instance.
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 Supported by the .NET Compact Framework Supported by the XNA Framework IsLeapYear Returns an indication whether the specified year is a leap year.
Public method Static Supported by the .NET Compact Framework Supported by the XNA 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 Supported by the XNA Framework op_Equality Determines whether two specified instances of DateTime are equal.
Public method Static Supported by the .NET Compact Framework Supported by the XNA Framework op_GreaterThan Determines whether one specified DateTime is greater than another specified DateTime.
Public method Static Supported by the .NET Compact Framework Supported by the XNA 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 Supported by the XNA Framework op_Inequality Determines whether two specified instances of DateTime are not equal.
Public method Static Supported by the .NET Compact Framework Supported by the XNA Framework op_LessThan Determines whether one specified DateTime is less than another specified DateTime.
Public method Static Supported by the .NET Compact Framework Supported by the XNA 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 Supported by the XNA Framework op_Subtraction Overloaded. Subtracts a specified DateTime or TimeSpan from a specified DateTime.
Public method Static 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 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.
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 Supported by the XNA 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 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. Overridden. 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 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

Community Additions

ADD
Show:
© 2014 Microsoft