SqlDateTime to DateTime Conversion Home
This page is specific to:.NET Framework Version:1.1
.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
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View