EntityFunctions.AddYears 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.
Invokes the canonical AddYears
function. For information about the canonical AddYears
function, see Date and Time Canonical Functions.
Overloads
AddYears(Nullable<DateTimeOffset>, Nullable<Int32>) |
Invokes the canonical |
AddYears(Nullable<DateTime>, Nullable<Int32>) |
Invokes the canonical |
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.
AddYears(Nullable<DateTimeOffset>, Nullable<Int32>)
Invokes the canonical AddYears
function. For information about the canonical AddYears
function, see Date and Time Canonical Functions.
public:
static Nullable<DateTimeOffset> AddYears(Nullable<DateTimeOffset> dateValue, Nullable<int> addValue);
[System.Data.Objects.DataClasses.EdmFunction("Edm", "AddYears")]
public static DateTimeOffset? AddYears (DateTimeOffset? dateValue, int? addValue);
[<System.Data.Objects.DataClasses.EdmFunction("Edm", "AddYears")>]
static member AddYears : Nullable<DateTimeOffset> * Nullable<int> -> Nullable<DateTimeOffset>
Public Shared Function AddYears (dateValue As Nullable(Of DateTimeOffset), addValue As Nullable(Of Integer)) As Nullable(Of DateTimeOffset)
Parameters
- dateValue
- Nullable<DateTimeOffset>
A valid date time offset.
Returns
The dateValue
incremented by addValue
.
- 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
AddYears(Nullable<DateTime>, Nullable<Int32>)
Invokes the canonical AddYears
function. For information about the canonical AddYears
function, see Date and Time Canonical Functions.
public:
static Nullable<DateTime> AddYears(Nullable<DateTime> dateValue, Nullable<int> addValue);
[System.Data.Objects.DataClasses.EdmFunction("Edm", "AddYears")]
public static DateTime? AddYears (DateTime? dateValue, int? addValue);
[<System.Data.Objects.DataClasses.EdmFunction("Edm", "AddYears")>]
static member AddYears : Nullable<DateTime> * Nullable<int> -> Nullable<DateTime>
Public Shared Function AddYears (dateValue As Nullable(Of DateTime), addValue As Nullable(Of Integer)) As Nullable(Of DateTime)
Parameters
Returns
The dateValue
incremented by addValue
.
- 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.