DateTime Constructor (Int32, Int32, Int32, Int32, Int32, Int32, Int32)
Initializes a new instance of the DateTime structure and sets it to the specified year, month, day, hour, minute, second, and millisecond.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
public DateTime (
int year,
int month,
int day,
int hour,
int minute,
int second,
int millisecond
)
Parameters
- year
The year, expressed as a number ranging from 1 through 9999. - month
The month, expressed as a number ranging from 1 through 12. - day
The day, expressed as a number ranging from 1 through 31. - hour
The hour, expressed as a number ranging from 0 through 23. - minute
The minute, expressed as a number ranging from 0 through 59. - second
The second, expressed as a number ranging from 0 through 59. - millisecond
The millisecond, expressed as a number ranging from 0 through 999.
Version Information
Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, 4.1, and 4.2.