EdmFunctions.Month(DbExpression) 方法

定义

创建一个 DbFunctionExpression,它调用具有指定自变量的规范“Month”函数,其必须具有 DateTime 或 DateTimeOffset 结果类型。Creates a DbFunctionExpression that invokes the canonical 'Month' function with the specified argument, which must have a DateTime or DateTimeOffset result type. 该表达式的结果类型为 Edm.Int32。The result type of the expression is Edm.Int32.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Data::Common::CommandTrees::DbFunctionExpression ^ Month(System::Data::Common::CommandTrees::DbExpression ^ dateValue);
public static System.Data.Common.CommandTrees.DbFunctionExpression Month (this System.Data.Common.CommandTrees.DbExpression dateValue);
static member Month : System.Data.Common.CommandTrees.DbExpression -> System.Data.Common.CommandTrees.DbFunctionExpression
<Extension()>
Public Function Month (dateValue As DbExpression) As DbFunctionExpression

参数

dateValue
DbExpression

一个表达式,该表达式指定应从中检索月的值。An expression that specifies the value from which the month should be retrieved.

返回

DbFunctionExpression

一个新的 DbFunctionExpression,它从 dateValue 中返回整数月值。A new DbFunctionExpression that returns the integer month value from dateValue.

例外

dateValuedateValue

dateValuedateValue

适用于