C# DateTime SpecifyKind
Description
DateTime SpecifyKind
creates a new DateTime object that
has the same number of ticks as the specified DateTime, but is designated
as either local time, Coordinated Universal Time (UTC), or neither, as indicated
by the specified DateTimeKind value.
Syntax
DateTime.SpecifyKind
has the following syntax.
public static DateTime SpecifyKind(
DateTime value,
DateTimeKind kind
)
Parameters
DateTime.SpecifyKind
has the following parameters.
value
- A date and time.kind
- One of the enumeration values that indicates whether the new object represents local time, UTC, or neither.
Returns
DateTime.SpecifyKind
method returns A new object that has the same number of ticks as the object represented by
the value parameter and the DateTimeKind value specified by the kind parameter.