This documentation is archived and is not being maintained.

DateTimeKind Enumeration

Note: This enumeration is new in the .NET Framework version 2.0.

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)

public enum class DateTimeKind
/** @attribute SerializableAttribute() */ 
/** @attribute ComVisibleAttribute(true) */ 
public enum DateTimeKind
public enum DateTimeKind

 Member nameDescription
Supported by the .NET Compact FrameworkLocalThe time represented is local time. 
Supported by the .NET Compact FrameworkUnspecifiedThe time represented is not specified as either local time or Coordinated Universal Time (UTC). 
Supported by the .NET Compact FrameworkUtcThe time represented is UTC. 

The members of DateTimeKind are used 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 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

.NET Compact Framework

Supported in: 2.0