EdmFunctions.CreateDateTime 方法

定义

创建一个 DbFunctionExpression 使用指定参数调用规范“CreateDateTime”函数的函数。 second 必须具有 Edm.Double 的结果类型,而所有其他参数必须具有 Edm.Int32 的结果类型。 表达式的结果类型为 Edm.DateTime。

public:
 static System::Data::Common::CommandTrees::DbFunctionExpression ^ CreateDateTime(System::Data::Common::CommandTrees::DbExpression ^ year, System::Data::Common::CommandTrees::DbExpression ^ month, System::Data::Common::CommandTrees::DbExpression ^ day, System::Data::Common::CommandTrees::DbExpression ^ hour, System::Data::Common::CommandTrees::DbExpression ^ minute, System::Data::Common::CommandTrees::DbExpression ^ second);
public static System.Data.Common.CommandTrees.DbFunctionExpression CreateDateTime(System.Data.Common.CommandTrees.DbExpression year, System.Data.Common.CommandTrees.DbExpression month, System.Data.Common.CommandTrees.DbExpression day, System.Data.Common.CommandTrees.DbExpression hour, System.Data.Common.CommandTrees.DbExpression minute, System.Data.Common.CommandTrees.DbExpression second);
static member CreateDateTime : System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbExpression -> System.Data.Common.CommandTrees.DbFunctionExpression
Public Function CreateDateTime (year As DbExpression, month As DbExpression, day As DbExpression, hour As DbExpression, minute As DbExpression, second As DbExpression) As DbFunctionExpression

参数

year
DbExpression

一个表达式,它为新的 DateTime 实例提供年份值。

month
DbExpression

一个表达式,它为新的 DateTime 实例提供月份值。

day
DbExpression

一个表达式,它为新的 DateTime 实例提供日期值。

hour
DbExpression

一个表达式,它为新的 DateTime 实例提供小时值。

minute
DbExpression

一个表达式,它为新的 DateTime 实例提供分钟值。

second
DbExpression

为新的 DateTime 实例提供第二个值的表达式。

返回

一个新的 DbFunctionExpression,基于指定的值返回新的 DateTime。

例外

year、、monthdayhourminutesecond isnull

year、、monthdayhourminutesecond无效。

适用于