SqlMethods.DateDiffMonth 메서드

정의

지정된 두 날짜 사이의 월 경계 수를 계산합니다.

오버로드

Name Description
DateDiffMonth(DateTime, DateTime)

Null을 허용하지 않는 두 날짜 사이의 월 경계 수를 계산합니다.

DateDiffMonth(DateTimeOffset, DateTimeOffset)

Null을 허용하지 않는 두 날짜 사이의 월 경계 수를 계산합니다.

DateDiffMonth(Nullable<DateTime>, Nullable<DateTime>)

두 nullable 날짜 사이의 월 경계 수를 계산합니다.

DateDiffMonth(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

두 nullable 날짜 사이의 월 경계 수를 계산합니다.

설명

month 사용하여 교차된 시간 경계 유형을 지정하는 SQL Server DATEDIFF 함수에 해당합니다. 이 SQL Server 함수에 대한 자세한 내용은 DATEDIFF 참조하세요.

DateDiffMonth(DateTime, DateTime)

Null을 허용하지 않는 두 날짜 사이의 월 경계 수를 계산합니다.

public:
 static int DateDiffMonth(DateTime startDate, DateTime endDate);
public static int DateDiffMonth(DateTime startDate, DateTime endDate);
static member DateDiffMonth : DateTime * DateTime -> int
Public Shared Function DateDiffMonth (startDate As DateTime, endDate As DateTime) As Integer

매개 변수

startDate
DateTime

기간의 시작 날짜입니다.

endDate
DateTime

기간의 종료 날짜입니다.

반품

지정된 두 날짜 사이의 월 경계 수입니다.

설명

month 사용하여 교차된 시간 경계 유형을 지정하는 SQL Server DATEDIFF 함수에 해당합니다. 이 SQL Server 함수에 대한 자세한 내용은 DATEDIFF 참조하세요.

적용 대상

DateDiffMonth(DateTimeOffset, DateTimeOffset)

Null을 허용하지 않는 두 날짜 사이의 월 경계 수를 계산합니다.

public:
 static int DateDiffMonth(DateTimeOffset startDate, DateTimeOffset endDate);
public static int DateDiffMonth(DateTimeOffset startDate, DateTimeOffset endDate);
static member DateDiffMonth : DateTimeOffset * DateTimeOffset -> int
Public Shared Function DateDiffMonth (startDate As DateTimeOffset, endDate As DateTimeOffset) As Integer

매개 변수

startDate
DateTimeOffset

기간의 시작 날짜입니다.

endDate
DateTimeOffset

기간의 종료 날짜입니다.

반품

지정된 두 날짜 사이의 월 경계 수입니다.

설명

month 사용하여 교차된 시간 경계 유형을 지정하는 SQL Server DATEDIFF 함수에 해당합니다. 이 SQL Server 함수에 대한 자세한 내용은 DATEDIFF 참조하세요.

적용 대상

DateDiffMonth(Nullable<DateTime>, Nullable<DateTime>)

두 nullable 날짜 사이의 월 경계 수를 계산합니다.

public:
 static Nullable<int> DateDiffMonth(Nullable<DateTime> startDate, Nullable<DateTime> endDate);
public static int? DateDiffMonth(DateTime? startDate, DateTime? endDate);
static member DateDiffMonth : Nullable<DateTime> * Nullable<DateTime> -> Nullable<int>
Public Shared Function DateDiffMonth (startDate As Nullable(Of DateTime), endDate As Nullable(Of DateTime)) As Nullable(Of Integer)

매개 변수

startDate
Nullable<DateTime>

기간의 시작 날짜입니다.

endDate
Nullable<DateTime>

기간의 종료 날짜입니다.

반품

두 매개 변수가 모두 없는 null경우 지정된 두 날짜 사이의 월 경계 수를 반환합니다. 하나 또는 두 매개 변수가 모두 있으면 null값을 반환합니다 null .

설명

month 사용하여 교차된 시간 경계 유형을 지정하는 SQL Server DATEDIFF 함수에 해당합니다. 이 SQL Server 함수에 대한 자세한 내용은 DATEDIFF 참조하세요.

적용 대상

DateDiffMonth(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

두 nullable 날짜 사이의 월 경계 수를 계산합니다.

public:
 static Nullable<int> DateDiffMonth(Nullable<DateTimeOffset> startDate, Nullable<DateTimeOffset> endDate);
public static int? DateDiffMonth(DateTimeOffset? startDate, DateTimeOffset? endDate);
static member DateDiffMonth : Nullable<DateTimeOffset> * Nullable<DateTimeOffset> -> Nullable<int>
Public Shared Function DateDiffMonth (startDate As Nullable(Of DateTimeOffset), endDate As Nullable(Of DateTimeOffset)) As Nullable(Of Integer)

매개 변수

startDate
Nullable<DateTimeOffset>

기간의 시작 날짜입니다.

endDate
Nullable<DateTimeOffset>

기간의 종료 날짜입니다.

반품

두 매개 변수가 모두 없는 null경우 지정된 두 날짜 사이의 월 경계 수를 반환합니다. 하나 또는 두 매개 변수가 모두 있으면 null값을 반환합니다 null .

설명

month 사용하여 교차된 시간 경계 유형을 지정하는 SQL Server DATEDIFF 함수에 해당합니다. 이 SQL Server 함수에 대한 자세한 내용은 DATEDIFF 참조하세요.

적용 대상