EdmFunctions.Year(DbExpression) Metoda

Definicja

Tworzy obiekt DbFunctionExpression , który wywołuje funkcję kanoniczną "Year" z określonym argumentem, który musi mieć typ wyniku DateTime lub DateTimeOffset. Typ wyniku wyrażenia to 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

Parametry

dateValue
DbExpression

Wyrażenie określające wartość, z której ma zostać pobrany rok.

Zwraca

Nowa wartość DbFunctionExpression zwracająca wartość roku całkowitego z dateValue.

Wyjątki

Parametr dateValue ma wartość null.

dateValue jest nieprawidłowy.

Dotyczy