語言

EntityFunctions.AddMonths 方法

定義

多載

名稱 Description
AddMonths(Nullable<DateTime>, Nullable<Int32>)

當作為 LINQ 對 Entities 查詢的一部分時,此方法會調用典型的 AddMonths EDM 函式,將指定月份數加到日期/時間上。

AddMonths(Nullable<DateTimeOffset>, Nullable<Int32>)

當作為 LINQ 對 Entities 查詢的一部分時,此方法會調用典型的 AddMonths EDM 函式,將指定月份數加到日期/時間上。

AddMonths(Nullable<DateTime>, Nullable<Int32>)

當作為 LINQ 對 Entities 查詢的一部分時,此方法會調用典型的 AddMonths EDM 函式,將指定月份數加到日期/時間上。

[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)

參數

dateValue
Nullable<DateTime>

輸入日期/時間。

addValue
Nullable<Int32>

要加多少個月。

傳回

一個結果的日期/時間。

屬性

備註

你不能直接呼叫這個函式。 此函式只能出現在 LINQ 對 Entities 查詢中。 這個函式會被轉換成資料庫中的對應函式。

適用於

AddMonths(Nullable<DateTimeOffset>, Nullable<Int32>)

當作為 LINQ 對 Entities 查詢的一部分時,此方法會調用典型的 AddMonths EDM 函式,將指定月份數加到日期/時間上。

[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)

參數

dateValue
Nullable<DateTimeOffset>

輸入日期/時間。

addValue
Nullable<Int32>

要加多少個月。

傳回

一個結果的日期/時間。

屬性

備註

你不能直接呼叫這個函式。 此函式只能出現在 LINQ 對 Entities 查詢中。 這個函式會被轉換成資料庫中的對應函式。

適用於