DateTime Members
The DateTime type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() |
DateTime(Int64) |
Initializes a new instance of the DateTime structure to a specified number of ticks.
|
![]() |
DateTime(String) |
String value representing a date. The string should be in a format recognized by the Date.parse() method (IETF-compliant RFC 2822 timestamps and also a version of ISO8601).
|
![]() |
DateTime(Int32, Int32) | |
![]() |
DateTime(Int32, Int32, Int32) |
Initializes a new instance of the DateTime structure to the specified year, month, and day.
|
![]() |
DateTime(Int32, Int32, Int32, Int32) | |
![]() |
DateTime(Int32, Int32, Int32, Int32, Int32) | |
![]() |
DateTime(Int32, Int32, Int32, Int32, Int32, Int32) |
Initializes a new instance of the DateTime structure to the specified year, month, day, hour, minute, and second.
|
![]() |
DateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32) |
Initializes a new instance of the DateTime structure to the specified year, month, day, hour, minute, second, and millisecond.
|
Methods
Operators
Fields
Name | Description | |
---|---|---|
![]() ![]() |
MaxValue |
Represents the largest possible value of DateTime. This field is read-only.
|
![]() ![]() |
MinValue |
Represents the smallest possible value of DateTime. This field is read-only.
|
Properties
Name | Description | |
---|---|---|
![]() |
Date |
Gets the date component of this instance.
|
![]() |
Day |
Gets the day of the month represented by this instance.
|
![]() |
DayOfWeek |
Gets the day of the week represented by this instance.
|
![]() |
DayOfYear |
Gets the day of the year represented by this instance.
|
![]() |
Hour |
Gets the hour component of the date represented by this instance.
|
![]() |
Millisecond |
Gets the milliseconds component of the date represented by this instance.
|
![]() |
Minute |
Gets the minute component of the date represented by this instance.
|
![]() |
Month |
Gets the month component of the date represented by this instance.
|
![]() ![]() |
Now |
Gets a DateTime object that is set to the current date and time on this computer, expressed as the local time.
|
![]() |
Second |
Gets the seconds component of the date represented by this instance.
|
![]() |
Ticks |
Gets the number of ticks that represent the date and time of this instance.
|
![]() |
TimeOfDay |
Gets the time of day for this instance.
|
![]() ![]() |
Today |
Gets the current date.
|
![]() ![]() |
UtcNow |
Gets a DateTime object that is set to the current date and time on this computer, expressed as the Coordinated Universal Time (UTC).
|
![]() |
Year |
Gets the year component of the date represented by this instance.
|