EntityFunctions.AddMonths Method
Definition
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.
Overloads
AddMonths(Nullable<DateTime>, Nullable<Int32>) |
When used as part of a LINQ to Entities query, this method invokes the canonical AddMonths EDM function to add the given number of months to a date/time. |
AddMonths(Nullable<DateTimeOffset>, Nullable<Int32>) |
When used as part of a LINQ to Entities query, this method invokes the canonical AddMonths EDM function to add the given number of months to a date/time. |
AddMonths(Nullable<DateTime>, Nullable<Int32>)
When used as part of a LINQ to Entities query, this method invokes the canonical AddMonths EDM function to add the given number of months to a date/time.
[System.Data.Entity.DbFunction("Edm", "AddMonths")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="addValue")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="dateValue")]
public static Nullable<DateTime> AddMonths (Nullable<DateTime> dateValue, Nullable<int> addValue);
static member AddMonths : Nullable<DateTime> * Nullable<int> -> Nullable<DateTime>
Public Shared Function AddMonths (dateValue As Nullable(Of DateTime), addValue As Nullable(Of Integer)) As Nullable(Of DateTime)
Parameters
Returns
A resulting date/time.
- Attributes
Remarks
You cannot call this function directly. This function can only appear within a LINQ to Entities query. This function is translated to a corresponding function in the database.
Applies to
AddMonths(Nullable<DateTimeOffset>, Nullable<Int32>)
When used as part of a LINQ to Entities query, this method invokes the canonical AddMonths EDM function to add the given number of months to a date/time.
[System.Data.Entity.DbFunction("Edm", "AddMonths")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="dateValue")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="addValue")]
public static Nullable<DateTimeOffset> AddMonths (Nullable<DateTimeOffset> dateValue, Nullable<int> addValue);
static member AddMonths : Nullable<DateTimeOffset> * Nullable<int> -> Nullable<DateTimeOffset>
Public Shared Function AddMonths (dateValue As Nullable(Of DateTimeOffset), addValue As Nullable(Of Integer)) As Nullable(Of DateTimeOffset)
Parameters
- dateValue
- Nullable<DateTimeOffset>
The input date/time.
Returns
A resulting date/time.
- Attributes
Remarks
You cannot call this function directly. This function can only appear within a LINQ to Entities query. This function is translated to a corresponding function in the database.
Applies to
Entity Framework