EdmFunctions.Year(DbExpression) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a DbFunctionExpression that invokes the canonical 'Year' function with the specified argument, which must have a DateTime or DateTimeOffset result type. The result type of the expression is Edm.Int32.
public:
[System::Runtime::CompilerServices::Extension]
static System::Data::Common::CommandTrees::DbFunctionExpression ^ Year(System::Data::Common::CommandTrees::DbExpression ^ dateValue);
public static System.Data.Common.CommandTrees.DbFunctionExpression Year(this System.Data.Common.CommandTrees.DbExpression dateValue);
static member Year : System.Data.Common.CommandTrees.DbExpression -> System.Data.Common.CommandTrees.DbFunctionExpression
<Extension()>
Public Function Year (dateValue As DbExpression) As DbFunctionExpression
- dateValue
- DbExpression
An expression that specifies the value from which the year should be retrieved.
A new DbFunctionExpression that returns the integer year value from dateValue
.
dateValue
is null
.
dateValue
is invalid.
Продукт | Версии |
---|---|
.NET Framework | 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Обратна връзка за .NET
.NET е проект с отворен код. Изберете връзка, за да предоставите обратна връзка: