EdmFunctions.DiffYears(DbExpression, DbExpression) Metodo

Definizione

Crea un oggetto DbFunctionExpression che richiama la funzione 'DiffYears' canonica con gli argomenti specificati, che devono avere ogni tipo di risultato DateTime o DateTimeOffset. Il tipo di risultato dell'espressione è Edm.Int32.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Data::Common::CommandTrees::DbFunctionExpression ^ DiffYears(System::Data::Common::CommandTrees::DbExpression ^ dateValue1, System::Data::Common::CommandTrees::DbExpression ^ dateValue2);
public static System.Data.Common.CommandTrees.DbFunctionExpression DiffYears(this System.Data.Common.CommandTrees.DbExpression dateValue1, System.Data.Common.CommandTrees.DbExpression dateValue2);
static member DiffYears : System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbExpression -> System.Data.Common.CommandTrees.DbFunctionExpression
<Extension()>
Public Function DiffYears (dateValue1 As DbExpression, dateValue2 As DbExpression) As DbFunctionExpression

Parametri

dateValue1
DbExpression

Espressione che specifica il primo argomento del valore di data.

dateValue2
DbExpression

Espressione che specifica il secondo argomento valore di data.

Valori restituiti

Nuovo DbFunctionExpression che restituisce il numero di anni che rappresenta la differenza tra dateValue1 e dateValue2.

Si applica a