This documentation is archived and is not being maintained.

DateTimeKind Enumeration

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 Server 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 Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

.NET Compact Framework

Supported in: 2.0

XNA Framework

Supported in: 1.0