EdmFunctions.DiffMonths(DbExpression, DbExpression) Metodo

Definizione

Crea un oggetto DbFunctionExpression che richiama la funzione 'DiffMonths' 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 ^ DiffMonths(System::Data::Common::CommandTrees::DbExpression ^ dateValue1, System::Data::Common::CommandTrees::DbExpression ^ dateValue2);
public static System.Data.Common.CommandTrees.DbFunctionExpression DiffMonths(this System.Data.Common.CommandTrees.DbExpression dateValue1, System.Data.Common.CommandTrees.DbExpression dateValue2);
static member DiffMonths : System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbExpression -> System.Data.Common.CommandTrees.DbFunctionExpression
<Extension()>
Public Function DiffMonths (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 mesi che rappresenta la differenza tra dateValue1 e dateValue2.

Si applica a