EdmFunctions.CreateDateTime 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
创建一个 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、、monthday、hour、 minute或 second isnull。
year、、monthday、hour、 minute或second无效。