SqlDateTime.Explicit SqlDateTime.Explicit SqlDateTime.Explicit SqlDateTime.Explicit Operator

定义

重载

Explicit(SqlDateTime to DateTime) Explicit(SqlDateTime to DateTime) Explicit(SqlDateTime to DateTime) Explicit(SqlDateTime to DateTime)

SqlDateTime 结构转换为 DateTime 结构。Converts the SqlDateTime structure to a DateTime structure.

Explicit(SqlString to SqlDateTime) Explicit(SqlString to SqlDateTime) Explicit(SqlString to SqlDateTime) Explicit(SqlString to SqlDateTime)

SqlString 参数转换为 SqlDateTimeConverts the SqlString parameter to a SqlDateTime.

Explicit(SqlDateTime to DateTime) Explicit(SqlDateTime to DateTime) Explicit(SqlDateTime to DateTime) Explicit(SqlDateTime to DateTime)

SqlDateTime 结构转换为 DateTime 结构。Converts the SqlDateTime structure to a DateTime structure.

public:
 static explicit operator DateTime(System::Data::SqlTypes::SqlDateTime x);
public static explicit operator DateTime (System.Data.SqlTypes.SqlDateTime x);
static member op_Explicit : System.Data.SqlTypes.SqlDateTime -> DateTime
Public Shared Narrowing Operator CType (x As SqlDateTime) As DateTime

参数

返回

一个 DateTime 对象,其 DateTimeOfDay 属性与提供的 Value 结构的 SqlDateTime 属性包含相同的日期和时间值。A DateTime object whose Date and TimeOfDay properties contain the same date and time values as the Value property of the supplied SqlDateTime structure.

注解

此运算符的等效方法是SqlDateTime.ValueThe equivalent method for this operator is SqlDateTime.Value

另请参阅

Explicit(SqlString to SqlDateTime) Explicit(SqlString to SqlDateTime) Explicit(SqlString to SqlDateTime) Explicit(SqlString to SqlDateTime)

SqlString 参数转换为 SqlDateTimeConverts the SqlString parameter to a SqlDateTime.

public:
 static explicit operator System::Data::SqlTypes::SqlDateTime(System::Data::SqlTypes::SqlString x);
public static explicit operator System.Data.SqlTypes.SqlDateTime (System.Data.SqlTypes.SqlString x);
static member op_Explicit : System.Data.SqlTypes.SqlString -> System.Data.SqlTypes.SqlDateTime
Public Shared Narrowing Operator CType (x As SqlString) As SqlDateTime

参数

返回

一个 SqlDateTime 结构,其 Value 等于 SqlString 参数表示的日期和时间。A SqlDateTime structure whose Value is equal to the date and time represented by the SqlString parameter. 如果 SqlString 为 null,则新创建的 SqlDateTime 结构的 Value 将为 Null。If the SqlString is null, the Value of the newly created SqlDateTime structure will be null.

另请参阅

适用于