SpecifyKind()

DateTime::SpecifyKind(DateTime, DateTimeKind) method

Constructs a new DateTime object that represents the same number of ticks as the specified DateTime object and represents local time, UTC time or neither as specified by the argument kind.

static DateTime System::DateTime::SpecifyKind(DateTime value, DateTimeKind kind)

Arguments

ParameterTypeDescription
valueDateTimeThe DateTime object to copy the number of ticks from
kindDateTimeKindSpecifies if the new object should represent local time, UTC time or neither.

Return Value

A new DateTime object that represents the same number of ticks as value and DateTimeKind value specified by kind.

See Also