Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
Previous Versions
.NET Framework 1.1
.NET Framework
Reference
 SqlDateTime to DateTime Conversion

  Switch on low bandwidth view
.NET Framework Class Library
SqlDateTime to DateTime Conversion

Converts a SqlDateTime structure to a DateTime structure.

[Visual Basic]
returnValue = SqlDateTime.op_Explicit(x)
[C#]
public static explicit operator DateTime(
 SqlDateTime x
);
[C++]
public: static DateTime op_Explicit();
[JScript]
returnValue = DateTime(x);

[Visual Basic] In Visual Basic, you can use the conversion operators defined by a type, but you cannot define your own.

[JScript] In JScript, you can use the conversion operators defined by a type, but you cannot define your own.

Arguments [Visual Basic, JScript]

x
A SqlDateTime structure.

Parameters [C#]

x
A SqlDateTime structure.

Return Value

A DateTime object whose Date and TimeOfDay properties contain the same date and time values as the Value property of the supplied SqlDateTime structure.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

SqlDateTime Structure | SqlDateTime Members | System.Data.SqlTypes Namespace

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker