次の方法で共有


SqlServerDbFunctionsExtensions.DateDiffYear メソッド

定義

オーバーロード

DateDiffYear(DbFunctions, DateOnly, DateOnly)

endDateの間で交差した年の境界の数をstartDateカウントします。 SQL Server の DATEDIFF(year, @startDate, @endDate)に対応します。

DateDiffYear(DbFunctions, DateTime, DateTime)

endDateの間で交差した年の境界の数をstartDateカウントします。 SQL Server の DATEDIFF(year, @startDate, @endDate)に対応します。

DateDiffYear(DbFunctions, DateTimeOffset, DateTimeOffset)

endDateの間で交差した年の境界の数をstartDateカウントします。 SQL Server の DATEDIFF(year, @startDate, @endDate)に対応します。

DateDiffYear(DbFunctions, Nullable<DateOnly>, Nullable<DateOnly>)

endDateの間で交差した年の境界の数をstartDateカウントします。 SQL Server の DATEDIFF(year, @startDate, @endDate)に対応します。

DateDiffYear(DbFunctions, Nullable<DateTime>, Nullable<DateTime>)

と の間 startDate で交差した年の境界の数を endDateカウントします。 SQL Server の DATEDIFF(year, @startDate, @endDate)に対応します。

DateDiffYear(DbFunctions, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

endDateの間で交差した年の境界の数をstartDateカウントします。 SQL Server の DATEDIFF(year, @startDate, @endDate)に対応します。

DateDiffYear(DbFunctions, DateOnly, DateOnly)

endDateの間で交差した年の境界の数をstartDateカウントします。 SQL Server の DATEDIFF(year, @startDate, @endDate)に対応します。

public static int DateDiffYear (this Microsoft.EntityFrameworkCore.DbFunctions _, DateOnly startDate, DateOnly endDate);
static member DateDiffYear : Microsoft.EntityFrameworkCore.DbFunctions * DateOnly * DateOnly -> int
<Extension()>
Public Function DateDiffYear (_ As DbFunctions, startDate As DateOnly, endDate As DateOnly) As Integer

パラメーター

_
DbFunctions

DbFunctions のインスタンスです。

startDate
DateOnly

計算の開始日。

endDate
DateOnly

計算の終了日。

戻り値

日付間で交差する年の境界の数。

注釈

詳細と例については、「データベース関数」および「EF Core を使用したデータベースのSQL ServerとAzure SQLへのアクセス」を参照してください。

適用対象

DateDiffYear(DbFunctions, DateTime, DateTime)

endDateの間で交差した年の境界の数をstartDateカウントします。 SQL Server の DATEDIFF(year, @startDate, @endDate)に対応します。

public static int DateDiffYear (this Microsoft.EntityFrameworkCore.DbFunctions _, DateTime startDate, DateTime endDate);
static member DateDiffYear : Microsoft.EntityFrameworkCore.DbFunctions * DateTime * DateTime -> int
<Extension()>
Public Function DateDiffYear (_ As DbFunctions, startDate As DateTime, endDate As DateTime) As Integer

パラメーター

_
DbFunctions

DbFunctions のインスタンスです。

startDate
DateTime

計算の開始日。

endDate
DateTime

計算の終了日。

戻り値

日付間で交差する年の境界の数。

注釈

詳細と例については、「データベース関数」および「EF Core を使用したデータベースのSQL ServerとAzure SQLへのアクセス」を参照してください。

適用対象

DateDiffYear(DbFunctions, DateTimeOffset, DateTimeOffset)

endDateの間で交差した年の境界の数をstartDateカウントします。 SQL Server の DATEDIFF(year, @startDate, @endDate)に対応します。

public static int DateDiffYear (this Microsoft.EntityFrameworkCore.DbFunctions _, DateTimeOffset startDate, DateTimeOffset endDate);
static member DateDiffYear : Microsoft.EntityFrameworkCore.DbFunctions * DateTimeOffset * DateTimeOffset -> int
<Extension()>
Public Function DateDiffYear (_ As DbFunctions, startDate As DateTimeOffset, endDate As DateTimeOffset) As Integer

パラメーター

_
DbFunctions

DbFunctions のインスタンスです。

startDate
DateTimeOffset

計算の開始日。

endDate
DateTimeOffset

計算の終了日。

戻り値

日付間で交差する年の境界の数。

注釈

詳細と例については、「データベース関数」および「EF Core を使用したデータベースのSQL ServerとAzure SQLへのアクセス」を参照してください。

適用対象

DateDiffYear(DbFunctions, Nullable<DateOnly>, Nullable<DateOnly>)

endDateの間で交差した年の境界の数をstartDateカウントします。 SQL Server の DATEDIFF(year, @startDate, @endDate)に対応します。

public static int? DateDiffYear (this Microsoft.EntityFrameworkCore.DbFunctions _, DateOnly? startDate, DateOnly? endDate);
static member DateDiffYear : Microsoft.EntityFrameworkCore.DbFunctions * Nullable<DateOnly> * Nullable<DateOnly> -> Nullable<int>
<Extension()>
Public Function DateDiffYear (_ As DbFunctions, startDate As Nullable(Of DateOnly), endDate As Nullable(Of DateOnly)) As Nullable(Of Integer)

パラメーター

_
DbFunctions

DbFunctions のインスタンスです。

startDate
Nullable<DateOnly>

計算の開始日。

endDate
Nullable<DateOnly>

計算の終了日。

戻り値

日付間で交差する年の境界の数。

注釈

詳細と例については、「データベース関数」および「EF Core を使用したデータベースのSQL ServerとAzure SQLへのアクセス」を参照してください。

適用対象

DateDiffYear(DbFunctions, Nullable<DateTime>, Nullable<DateTime>)

と の間 startDate で交差した年の境界の数を endDateカウントします。 SQL Server の DATEDIFF(year, @startDate, @endDate)に対応します。

public static int? DateDiffYear (this Microsoft.EntityFrameworkCore.DbFunctions _, DateTime? startDate, DateTime? endDate);
static member DateDiffYear : Microsoft.EntityFrameworkCore.DbFunctions * Nullable<DateTime> * Nullable<DateTime> -> Nullable<int>
<Extension()>
Public Function DateDiffYear (_ As DbFunctions, startDate As Nullable(Of DateTime), endDate As Nullable(Of DateTime)) As Nullable(Of Integer)

パラメーター

_
DbFunctions

DbFunctions のインスタンスです。

startDate
Nullable<DateTime>

計算の開始日。

endDate
Nullable<DateTime>

計算の終了日。

戻り値

日付間で交差する年の境界の数。

注釈

詳細と例については、「データベース関数」および「EF Core を使用したデータベースのSQL ServerとAzure SQLへのアクセス」を参照してください。

適用対象

DateDiffYear(DbFunctions, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

endDateの間で交差した年の境界の数をstartDateカウントします。 SQL Server の DATEDIFF(year, @startDate, @endDate)に対応します。

public static int? DateDiffYear (this Microsoft.EntityFrameworkCore.DbFunctions _, DateTimeOffset? startDate, DateTimeOffset? endDate);
static member DateDiffYear : Microsoft.EntityFrameworkCore.DbFunctions * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> -> Nullable<int>
<Extension()>
Public Function DateDiffYear (_ As DbFunctions, startDate As Nullable(Of DateTimeOffset), endDate As Nullable(Of DateTimeOffset)) As Nullable(Of Integer)

パラメーター

_
DbFunctions

DbFunctions のインスタンスです。

startDate
Nullable<DateTimeOffset>

計算の開始日。

endDate
Nullable<DateTimeOffset>

計算の終了日。

戻り値

日付間で交差する年の境界の数。

注釈

詳細と例については、「データベース関数」および「EF Core を使用したデータベースのSQL ServerとAzure SQLへのアクセス」を参照してください。

適用対象