SqlDateTime Explicit Conversion (SqlDateTime to DateTime)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

equivalentCodeEntityP:System.Data.SqlTypes.SqlDateTime.Value

Converts the SqlDateTime structure to a DateTime structure.

Namespace:   System.Data.SqlTypes
Assembly:  System.Data (in System.Data.dll)

public static explicit operator DateTime (
	SqlDateTime x
)

Parameters

x
Type: System.Data.SqlTypes.SqlDateTime

A SqlDateTime structure.

Return Value

Type: System.DateTime

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

.NET Framework
Available since 1.1
Return to top
Show: