EdmFunctions.CreateDateTimeOffset 方法

定义

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

public:
 static System::Data::Common::CommandTrees::DbFunctionExpression ^ CreateDateTimeOffset(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, System::Data::Common::CommandTrees::DbExpression ^ timeZoneOffset);
public static System.Data.Common.CommandTrees.DbFunctionExpression CreateDateTimeOffset(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, System.Data.Common.CommandTrees.DbExpression timeZoneOffset);
static member CreateDateTimeOffset : 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.DbExpression -> System.Data.Common.CommandTrees.DbFunctionExpression
Public Function CreateDateTimeOffset (year As DbExpression, month As DbExpression, day As DbExpression, hour As DbExpression, minute As DbExpression, second As DbExpression, timeZoneOffset As DbExpression) As DbFunctionExpression

参数

year
DbExpression

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

month
DbExpression

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

day
DbExpression

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

hour
DbExpression

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

minute
DbExpression

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

second
DbExpression

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

timeZoneOffset
DbExpression

一个表达式,它提供新 DateTimeOffset 实例的时区偏移值中的分钟数。

返回

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

例外

year、、monthdayhourminutesecondtimeZoneOffset isnull

yearmonth、、dayhourminutesecondtimeZoneOffset无效。

适用于