DateTimeKind Enumeration
TOC
Collapse the table of content
Expand the table of content

DateTimeKind Enumeration

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Specifies whether a DateTime object represents a local time, a Coordinated Universal Time (UTC), or is not specified as either local time or UTC.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

No code example is currently available or this language may not be supported.

Member nameDescription
LocalThe time represented is local time.
UnspecifiedThe time represented is not specified as either local time or Coordinated Universal Time (UTC).
UtcThe time represented is UTC.

A member of the DateTimeKind enumeration is returned by the DateTime::Kind property.

The members of DateTimeKind are used with DateTime values in conversion operations between local time and Coordinated Universal Time (UTC), but not in any comparison or arithmetic operation.

The following code example uses the SpecifyKind method to demonstrate how the Kind property influences the ToLocalTime and ToUniversalTime conversion methods.

No code example is currently available or this language may not be supported.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft