DateTime Members
Public Constructors
DateTime Constructor Supported by the .NET Compact Framework. | Overloaded. Initializes a new instance of the DateTime structure. |
Public Fields
![]() MaxValue Supported by the .NET Compact Framework. | Represents the largest possible value of DateTime. This field is read-only. |
![]() MinValue Supported by the .NET Compact Framework. | Represents the smallest possible value of DateTime. This field is read-only. |
Public Properties
Date Supported by the .NET Compact Framework. | Gets the date component of this instance. |
Day Supported by the .NET Compact Framework. | Gets the day of the month represented by this instance. |
DayOfWeek Supported by the .NET Compact Framework. | Gets the day of the week represented by this instance. |
DayOfYear Supported by the .NET Compact Framework. | Gets the day of the year represented by this instance. |
Hour Supported by the .NET Compact Framework. | Gets the hour component of the date represented by this instance. |
Millisecond Supported by the .NET Compact Framework. | Gets the milliseconds component of the date represented by this instance. |
Minute Supported by the .NET Compact Framework. | Gets the minute component of the date represented by this instance. |
Month Supported by the .NET Compact Framework. | Gets the month component of the date represented by this instance. |
![]() Now Supported by the .NET Compact Framework. | Gets a DateTime that is the current local date and time on this computer. |
Second Supported by the .NET Compact Framework. | Gets the seconds component of the date represented by this instance. |
Ticks Supported by the .NET Compact Framework. | Gets the number of ticks that represent the date and time of this instance. |
TimeOfDay Supported by the .NET Compact Framework. | Gets the time of day for this instance. |
![]() Today Supported by the .NET Compact Framework. | Gets the current date. |
![]() UtcNow Supported by the .NET Compact Framework. | Gets a DateTime that is the current local date and time on this computer expressed as the coordinated universal time (UTC). |
Year Supported by the .NET Compact Framework. | Gets the year component of the date represented by this instance. |
Public Methods
Add Supported by the .NET Compact Framework. | Adds the value of the specified TimeSpan to the value of this instance. |
AddDays Supported by the .NET Compact Framework. | Adds the specified number of days to the value of this instance. |
AddHours Supported by the .NET Compact Framework. | Adds the specified number of hours to the value of this instance. |
AddMilliseconds Supported by the .NET Compact Framework. | Adds the specified number of milliseconds to the value of this instance. |
AddMinutes Supported by the .NET Compact Framework. | Adds the specified number of minutes to the value of this instance. |
AddMonths Supported by the .NET Compact Framework. | Adds the specified number of months to the value of this instance. |
AddSeconds Supported by the .NET Compact Framework. | Adds the specified number of seconds to the value of this instance. |
AddTicks Supported by the .NET Compact Framework. | Adds the specified number of ticks to the value of this instance. |
AddYears Supported by the .NET Compact Framework. | Adds the specified number of years to the value of this instance. |
![]() Compare Supported by the .NET Compact Framework. | Compares two instances of DateTime and returns an indication of their relative values. |
CompareTo Supported by the .NET Compact Framework. | Compares this instance to a specified object and returns an indication of their relative values. |
![]() DaysInMonth Supported by the .NET Compact Framework. | Returns the number of days in the specified month of the specified year. |
Equals Supported by the .NET Compact Framework. | Overloaded. Overridden. Returns a value indicating whether an instance of DateTime is equal to a specified object. |
![]() FromFileTime Supported by the .NET Compact Framework. | Returns a DateTime equivalent to the specified operating system file timestamp. |
![]() FromFileTimeUtc Supported by the .NET Compact Framework. | Returns a DateTime equivalent to the specified operating system file timestamp, adjusted to coordinated universal time (UTC). |
![]() FromOADate | Returns a DateTime equivalent to the specified OLE Automation Date. |
GetDateTimeFormats Supported by the .NET Compact Framework. | Overloaded. Converts the value of this instance to all the string representations supported by the standard DateTime format specifiers. |
GetHashCode Supported by the .NET Compact Framework. | Overridden. Returns the hash code for this instance. |
GetType (inherited from Object)
Supported by the .NET Compact Framework. | Gets the Type of the current instance. |
GetTypeCode Supported by the .NET Compact Framework. | Returns the TypeCode for value type DateTime. |
![]() IsLeapYear Supported by the .NET Compact Framework. | Returns an indication whether the specified year is a leap year. |
![]() Parse Supported by the .NET Compact Framework. | Overloaded. Converts the specified string representation of a date and time to its DateTime equivalent. |
![]() ParseExact Supported by the .NET Compact Framework. | 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. |
Subtract Supported by the .NET Compact Framework. | Overloaded. Subtracts the specified time or duration from this instance. |
ToFileTime Supported by the .NET Compact Framework. | Converts the value of this instance to the format of a local operating system file time. |
ToFileTimeUtc Supported by the .NET Compact Framework. | Converts the value of this instance to the format of operating system file time, ignoring the local time zone. |
ToLocalTime Supported by the .NET Compact Framework. | Converts the current coordinated universal time (UTC) to local time. |
ToLongDateString Supported by the .NET Compact Framework. | Converts the value of this instance to its equivalent long date string representation. |
ToLongTimeString Supported by the .NET Compact Framework. | Converts the value of this instance to its equivalent long time string representation. |
ToOADate | Converts the value of this instance to the equivalent OLE Automation date. |
ToShortDateString Supported by the .NET Compact Framework. | Converts the value of this instance to its equivalent short date string representation. |
ToShortTimeString Supported by the .NET Compact Framework. | Converts the value of this instance to its equivalent short time string representation. |
ToString Supported by the .NET Compact Framework. | Overloaded. Overridden. Converts the value of this instance to its equivalent string representation. |
ToUniversalTime Supported by the .NET Compact Framework. | Converts the current local time to coordinated universal time (UTC). |
Public Operators
![]() Addition Operator Supported by the .NET Compact Framework. | Adds a specified time interval to a specified date and time, yielding a new date and time. |
![]() Equality Operator Supported by the .NET Compact Framework. | Determines whether two specified instances of DateTime are equal. |
![]() Greater Than Operator Supported by the .NET Compact Framework. | Determines whether one specified DateTime is greater than another specified DateTime. |
![]() Greater Than Or Equal Operator Supported by the .NET Compact Framework. | Determines whether one specified DateTime is greater than or equal to another specified DateTime. |
![]() Inequality Operator Supported by the .NET Compact Framework. | Determines whether two specified instances of DateTime are not equal. |
![]() Less Than Operator Supported by the .NET Compact Framework. | Determines whether one specified DateTime is less than another specified DateTime. |
![]() Less Than Or Equal Operator Supported by the .NET Compact Framework. | Determines whether one specified DateTime is less than or equal to another specified DateTime. |
![]() Subtraction Operator Supported by the .NET Compact Framework. | Overloaded. Subtracts a specified DateTime or TimeSpan from a specified DateTime. |
Protected Methods
Finalize (inherited from Object)
Supported by the .NET Compact Framework. | Overridden. Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
In C# and C++, finalizers are expressed using destructor syntax. |
MemberwiseClone (inherited from Object)
Supported by the .NET Compact Framework. | Creates a shallow copy of the current Object. |


