System::DateTime::DateTime constructor

DateTime::DateTime() constructor

Constructs an instance that represents the smallest possible date and time value equal to MinValue.

System::DateTime::DateTime()

See Also

DateTime::DateTime(const DateTime&) constructor

Copy-constructs an instance.

System::DateTime::DateTime(const DateTime &dt)=default
ParameterTypeDescription
dtconst DateTime&An instance of DateTime class to copy the represented date and time value from

See Also

DateTime::DateTime(int, int, int) constructor

Constructs an instance that represents a date and time value specified as a particular year, month and day.

System::DateTime::DateTime(int year, int month, int day)
ParameterTypeDescription
yearintThe year to be represented by the instance being constructed.
monthintThe month of the year to be represented by the instance being constructed.
dayintThe day of the month to be represented by the instance being constructed.

See Also

DateTime::DateTime(int, int, int, const SharedPtr<Globalization::Calendar>&) constructor

Constructs an instance that represents a date and time value specified as a particular year, month and day in the specified calendar.

System::DateTime::DateTime(int year, int month, int day, const SharedPtr<Globalization::Calendar> &calendar)
ParameterTypeDescription
yearintThe year to be represented by the instance being constructed.
monthintThe month of the year to be represented by the instance being constructed.
dayintThe day of the month to be represented by the instance being constructed.
calendarconst SharedPtr<Globalization::Calendar>&The calendar used to interpret the specified year, month and day.

See Also

DateTime::DateTime(int, int, int, int, int, int) constructor

Constructs an instance that represents a date and time value specified as a particular year, month, day, hour, minute and second.

System::DateTime::DateTime(int year, int month, int day, int hour, int minute, int second)
ParameterTypeDescription
yearintThe year to be represented by the instance being constructed.
monthintThe month of the year to be represented by the instance being constructed.
dayintThe day of the month to be represented by the instance being constructed.
hourintThe hour of the day to be represented by the instance being constructed.
minuteintThe minute of the hour to be represented by the instance being constructed.
secondintThe second of the minute te be represented by the instance being constructed.

See Also

DateTime::DateTime(int, int, int, int, int, int, const SharedPtr<Globalization::Calendar>&) constructor

Constructs an instance that represents a date and time value specified as a particular year, month, day, hour, minute and second in the specified calendar.

System::DateTime::DateTime(int year, int month, int day, int hour, int minute, int second, const SharedPtr<Globalization::Calendar> &calendar)
ParameterTypeDescription
yearintThe year to be represented by the instance being constructed.
monthintThe month of the year to be represented by the instance being constructed.
dayintThe day of the month to be represented by the instance being constructed.
hourintThe hour of the day to be represented by the instance being constructed.
minuteintThe minute of the hour to be represented by the instance being constructed.
secondintThe second of the minute te be represented by the instance being constructed.
calendarconst SharedPtr<Globalization::Calendar>&The calendar used to interpret the specified year, month and day.

See Also

DateTime::DateTime(int, int, int, int, int, int, DateTimeKind) constructor

Constructs an instance that represents a date and time value specified as a particular year, month, day, hour, minute and second.

System::DateTime::DateTime(int year, int month, int day, int hour, int minute, int second, DateTimeKind kind)
ParameterTypeDescription
yearintThe year to be represented by the instance being constructed.
monthintThe month of the year to be represented by the instance being constructed.
dayintThe day of the month to be represented by the instance being constructed.
hourintThe hour of the day to be represented by the instance being constructed.
minuteintThe minute of the hour to be represented by the instance being constructed.
secondintThe second of the minute te be represented by the instance being constructed.
kindDateTimeKindThe value that indicates if the provided date and time parameters specify a local time, UTC time or neither.

See Also

DateTime::DateTime(int, int, int, int, int, int, int, const SharedPtr<Globalization::Calendar>&, DateTimeKind) constructor

Constructs an instance that represents a date and time value specified as a particular year, month, day, hour, minute, second and millisecond in the specified calendar.

System::DateTime::DateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, const SharedPtr<Globalization::Calendar> &calendar, DateTimeKind kind=DateTimeKind::Unspecified)
ParameterTypeDescription
yearintThe year to be represented by the instance being constructed.
monthintThe month of the year to be represented by the instance being constructed.
dayintThe day of the month to be represented by the instance being constructed.
hourintThe hour of the day to be represented by the instance being constructed.
minuteintThe minute of the hour to be represented by the instance being constructed.
secondintThe second of the minute te be represented by the instance being constructed.
millisecondintThe millisecond of the second to be represented by the instance being constructed.
kindconst SharedPtr<Globalization::Calendar>&The value that indicates if the provided date and time parameters specify a local time, UTC time or neither.
calendarDateTimeKindThe calendar used to interpret the specified year, month and day.

See Also

DateTime::DateTime(int, int, int, int, int, int, int, DateTimeKind) constructor

Constructs an instance that represents a date and time value specified as a particular year, month, day, hour, minute, second and millisecond.

System::DateTime::DateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, DateTimeKind kind=DateTimeKind::Unspecified)
ParameterTypeDescription
yearintThe year to be represented by the instance being constructed.
monthintThe month of the year to be represented by the instance being constructed.
dayintThe day of the month to be represented by the instance being constructed.
hourintThe hour of the day to be represented by the instance being constructed.
minuteintThe minute of the hour to be represented by the instance being constructed.
secondintThe second of the minute te be represented by the instance being constructed.
millisecondintThe millisecond of the second to be represented by the instance being constructed.
kindDateTimeKindThe value that indicates if the provided date and time parameters specify a local time, UTC time or neither.

See Also

DateTime::DateTime(int64_t, DateTimeKind, bool) constructor

Construct an instance that represents a date and time value specified as a number of ticks. FOR INTERNAL USE.

System::DateTime::DateTime(int64_t ticks, DateTimeKind kind, bool is_ambiguous_local_dst)
ParameterTypeDescription
ticksint64_tThe number of 100-ns intervals that have passed since January the 1st, 0001 00:00:00.000 in Georgian calendar.
kindDateTimeKindThe value that indicates if ticks parameter specifies a local time, UTC time or neither.
is_ambiguous_local_dstboolTrue if specified date and time is ambiguous and can be mapped to many UTC times.

See Also

DateTime::DateTime(int64_t, DateTimeKind) constructor

Construct an instance that represents a date and time value specified as a number of ticks.

System::DateTime::DateTime(int64_t ticks, DateTimeKind kind=DateTimeKind::Unspecified)
ParameterTypeDescription
ticksint64_tThe number of 100-ns intervals that have passed since January the 1st, 0001 00:00:00.000 in Georgian calendar.
kindDateTimeKindThe value that indicates if ticks parameter specifies a local time, UTC time or neither.

See Also