다음을 통해 공유


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

endDate사이에 startDate 교차된 연도 경계 수를 계산합니다. 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>)

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 * 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 데이터베이스 액세스를 참조하세요.

적용 대상