SqlFunctions.DateDiff 메서드

정의

지정된 두 날짜 사이에 교차된 날짜 및 시간 경계의 수를 반환합니다.

오버로드

Name Description
DateDiff(String, String, String)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

DateDiff(String, String, Nullable<TimeSpan>)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

DateDiff(String, String, Nullable<DateTimeOffset>)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

DateDiff(String, String, Nullable<DateTime>)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

DateDiff(String, Nullable<TimeSpan>, String)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

DateDiff(String, Nullable<TimeSpan>, Nullable<TimeSpan>)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

DateDiff(String, Nullable<TimeSpan>, Nullable<DateTimeOffset>)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

DateDiff(String, Nullable<TimeSpan>, Nullable<DateTime>)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

DateDiff(String, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

DateDiff(String, Nullable<DateTimeOffset>, Nullable<TimeSpan>)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

DateDiff(String, Nullable<DateTimeOffset>, String)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

DateDiff(String, Nullable<DateTimeOffset>, Nullable<DateTime>)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

DateDiff(String, Nullable<DateTime>, String)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

DateDiff(String, Nullable<DateTime>, Nullable<TimeSpan>)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

DateDiff(String, Nullable<DateTime>, Nullable<DateTimeOffset>)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

DateDiff(String, Nullable<DateTime>, Nullable<DateTime>)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

설명

이 함수는 직접 호출할 수 없습니다. 이 함수는 LINQ to Entities 쿼리 내에만 나타날 수 있습니다.

이 함수는 데이터베이스의 해당 함수로 변환됩니다. 해당 SQL Server 함수에 대한 자세한 내용은 DATEDIFF(Transact-SQL).;를 참조하세요.

DateDiff(String, String, String)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

public:
 static Nullable<int> DateDiff(System::String ^ datePartArg, System::String ^ startDate, System::String ^ endDate);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")]
public static int? DateDiff(string datePartArg, string startDate, string endDate);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")>]
static member DateDiff : string * string * string -> Nullable<int>
Public Shared Function DateDiff (datePartArg As String, startDate As String, endDate As String) As Nullable(Of Integer)

매개 변수

datePartArg
String

서로 다른 시간 간격 수를 계산할 날짜의 부분입니다.

startDate
String

첫 번째 날짜입니다.

endDate
String

두 번째 날짜입니다.

반품

두 날짜 사이의 시간 간격 수입니다.

특성

설명

이 함수는 직접 호출할 수 없습니다. 이 함수는 LINQ to Entities 쿼리 내에만 나타날 수 있습니다.

이 함수는 데이터베이스의 해당 함수로 변환됩니다. 해당 SQL Server 함수에 대한 자세한 내용은 DATEDIFF(Transact-SQL).;를 참조하세요.

적용 대상

DateDiff(String, String, Nullable<TimeSpan>)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

public:
 static Nullable<int> DateDiff(System::String ^ datePartArg, System::String ^ startDate, Nullable<TimeSpan> endDate);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")]
public static int? DateDiff(string datePartArg, string startDate, TimeSpan? endDate);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")>]
static member DateDiff : string * string * Nullable<TimeSpan> -> Nullable<int>
Public Shared Function DateDiff (datePartArg As String, startDate As String, endDate As Nullable(Of TimeSpan)) As Nullable(Of Integer)

매개 변수

datePartArg
String

서로 다른 시간 간격 수를 계산할 날짜의 부분입니다.

startDate
String

첫 번째 날짜입니다.

endDate
Nullable<TimeSpan>

두 번째 날짜입니다.

반품

두 날짜 사이의 시간 간격 수를 지정하는 값입니다.

특성

설명

이 함수는 직접 호출할 수 없습니다. 이 함수는 LINQ to Entities 쿼리 내에만 나타날 수 있습니다.

이 함수는 데이터베이스의 해당 함수로 변환됩니다. 해당 SQL Server 함수에 대한 자세한 내용은 DATEDIFF(Transact-SQL).;를 참조하세요.

적용 대상

DateDiff(String, String, Nullable<DateTimeOffset>)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

public:
 static Nullable<int> DateDiff(System::String ^ datePartArg, System::String ^ startDate, Nullable<DateTimeOffset> endDate);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")]
public static int? DateDiff(string datePartArg, string startDate, DateTimeOffset? endDate);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")>]
static member DateDiff : string * string * Nullable<DateTimeOffset> -> Nullable<int>
Public Shared Function DateDiff (datePartArg As String, startDate As String, endDate As Nullable(Of DateTimeOffset)) As Nullable(Of Integer)

매개 변수

datePartArg
String

서로 다른 시간 간격 수를 계산할 날짜의 부분입니다.

startDate
String

첫 번째 날짜입니다.

endDate
Nullable<DateTimeOffset>

두 번째 날짜입니다.

반품

두 날짜 사이의 시간 간격 수입니다.

특성

설명

이 함수는 직접 호출할 수 없습니다. 이 함수는 LINQ to Entities 쿼리 내에만 나타날 수 있습니다.

이 함수는 데이터베이스의 해당 함수로 변환됩니다. 해당 SQL Server 함수에 대한 자세한 내용은 DATEDIFF(Transact-SQL).;를 참조하세요.

적용 대상

DateDiff(String, String, Nullable<DateTime>)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

public:
 static Nullable<int> DateDiff(System::String ^ datePartArg, System::String ^ startDate, Nullable<DateTime> endDate);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")]
public static int? DateDiff(string datePartArg, string startDate, DateTime? endDate);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")>]
static member DateDiff : string * string * Nullable<DateTime> -> Nullable<int>
Public Shared Function DateDiff (datePartArg As String, startDate As String, endDate As Nullable(Of DateTime)) As Nullable(Of Integer)

매개 변수

datePartArg
String

서로 다른 시간 간격 수를 계산할 날짜의 부분입니다.

startDate
String

첫 번째 날짜입니다.

endDate
Nullable<DateTime>

두 번째 날짜입니다.

반품

두 날짜 사이의 시간 간격 수입니다.

특성

설명

이 함수는 직접 호출할 수 없습니다. 이 함수는 LINQ to Entities 쿼리 내에만 나타날 수 있습니다.

이 함수는 데이터베이스의 해당 함수로 변환됩니다. 해당 SQL Server 함수에 대한 자세한 내용은 DATEDIFF(Transact-SQL).;를 참조하세요.

적용 대상

DateDiff(String, Nullable<TimeSpan>, String)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

public:
 static Nullable<int> DateDiff(System::String ^ datePartArg, Nullable<TimeSpan> startDate, System::String ^ endDate);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")]
public static int? DateDiff(string datePartArg, TimeSpan? startDate, string endDate);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")>]
static member DateDiff : string * Nullable<TimeSpan> * string -> Nullable<int>
Public Shared Function DateDiff (datePartArg As String, startDate As Nullable(Of TimeSpan), endDate As String) As Nullable(Of Integer)

매개 변수

datePartArg
String

서로 다른 시간 간격 수를 계산할 날짜의 부분입니다.

startDate
Nullable<TimeSpan>

첫 번째 날짜입니다.

endDate
String

두 번째 날짜입니다.

반품

두 날짜 사이의 시간 간격 수입니다.

특성

설명

이 함수는 직접 호출할 수 없습니다. 이 함수는 LINQ to Entities 쿼리 내에만 나타날 수 있습니다.

이 함수는 데이터베이스의 해당 함수로 변환됩니다. 해당 SQL Server 함수에 대한 자세한 내용은 DATEDIFF(Transact-SQL).;를 참조하세요.

적용 대상

DateDiff(String, Nullable<TimeSpan>, Nullable<TimeSpan>)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

public:
 static Nullable<int> DateDiff(System::String ^ datePartArg, Nullable<TimeSpan> startDate, Nullable<TimeSpan> endDate);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")]
public static int? DateDiff(string datePartArg, TimeSpan? startDate, TimeSpan? endDate);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")>]
static member DateDiff : string * Nullable<TimeSpan> * Nullable<TimeSpan> -> Nullable<int>
Public Shared Function DateDiff (datePartArg As String, startDate As Nullable(Of TimeSpan), endDate As Nullable(Of TimeSpan)) As Nullable(Of Integer)

매개 변수

datePartArg
String

서로 다른 시간 간격 수를 계산할 날짜의 부분입니다.

startDate
Nullable<TimeSpan>

첫 번째 날짜입니다.

endDate
Nullable<TimeSpan>

두 번째 날짜입니다.

반품

두 날짜 사이의 시간 간격 수입니다.

특성

설명

이 함수는 직접 호출할 수 없습니다. 이 함수는 LINQ to Entities 쿼리 내에만 나타날 수 있습니다.

이 함수는 데이터베이스의 해당 함수로 변환됩니다. 해당 SQL Server 함수에 대한 자세한 내용은 DATEDIFF(Transact-SQL).;를 참조하세요.

적용 대상

DateDiff(String, Nullable<TimeSpan>, Nullable<DateTimeOffset>)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

public:
 static Nullable<int> DateDiff(System::String ^ datePartArg, Nullable<TimeSpan> startDate, Nullable<DateTimeOffset> endDate);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")]
public static int? DateDiff(string datePartArg, TimeSpan? startDate, DateTimeOffset? endDate);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")>]
static member DateDiff : string * Nullable<TimeSpan> * Nullable<DateTimeOffset> -> Nullable<int>
Public Shared Function DateDiff (datePartArg As String, startDate As Nullable(Of TimeSpan), endDate As Nullable(Of DateTimeOffset)) As Nullable(Of Integer)

매개 변수

datePartArg
String

서로 다른 시간 간격 수를 계산할 날짜의 부분입니다.

startDate
Nullable<TimeSpan>

첫 번째 날짜입니다.

endDate
Nullable<DateTimeOffset>

두 번째 날짜입니다.

반품

두 날짜 사이의 시간 간격 수입니다.

특성

설명

이 함수는 직접 호출할 수 없습니다. 이 함수는 LINQ to Entities 쿼리 내에만 나타날 수 있습니다.

이 함수는 데이터베이스의 해당 함수로 변환됩니다. 해당 SQL Server 함수에 대한 자세한 내용은 DATEDIFF(Transact-SQL).;를 참조하세요.

적용 대상

DateDiff(String, Nullable<TimeSpan>, Nullable<DateTime>)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

public:
 static Nullable<int> DateDiff(System::String ^ datePartArg, Nullable<TimeSpan> startDate, Nullable<DateTime> endDate);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")]
public static int? DateDiff(string datePartArg, TimeSpan? startDate, DateTime? endDate);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")>]
static member DateDiff : string * Nullable<TimeSpan> * Nullable<DateTime> -> Nullable<int>
Public Shared Function DateDiff (datePartArg As String, startDate As Nullable(Of TimeSpan), endDate As Nullable(Of DateTime)) As Nullable(Of Integer)

매개 변수

datePartArg
String

서로 다른 시간 간격 수를 계산할 날짜의 부분입니다.

startDate
Nullable<TimeSpan>

첫 번째 날짜입니다.

endDate
Nullable<DateTime>

두 번째 날짜입니다.

반품

두 날짜 사이의 시간 간격 수입니다.

특성

설명

이 함수는 직접 호출할 수 없습니다. 이 함수는 LINQ to Entities 쿼리 내에만 나타날 수 있습니다.

이 함수는 데이터베이스의 해당 함수로 변환됩니다. 해당 SQL Server 함수에 대한 자세한 내용은 DATEDIFF(Transact-SQL).;를 참조하세요.

적용 대상

DateDiff(String, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

public:
 static Nullable<int> DateDiff(System::String ^ datePartArg, Nullable<DateTimeOffset> startDate, Nullable<DateTimeOffset> endDate);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")]
public static int? DateDiff(string datePartArg, DateTimeOffset? startDate, DateTimeOffset? endDate);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")>]
static member DateDiff : string * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> -> Nullable<int>
Public Shared Function DateDiff (datePartArg As String, startDate As Nullable(Of DateTimeOffset), endDate As Nullable(Of DateTimeOffset)) As Nullable(Of Integer)

매개 변수

datePartArg
String

서로 다른 시간 간격 수를 계산할 날짜의 부분입니다.

startDate
Nullable<DateTimeOffset>

첫 번째 날짜입니다.

endDate
Nullable<DateTimeOffset>

두 번째 날짜입니다.

반품

두 날짜 사이의 시간 간격 수입니다.

특성

설명

이 함수는 직접 호출할 수 없습니다. 이 함수는 LINQ to Entities 쿼리 내에만 나타날 수 있습니다.

이 함수는 데이터베이스의 해당 함수로 변환됩니다. 해당 SQL Server 함수에 대한 자세한 내용은 DATEDIFF(Transact-SQL).;를 참조하세요.

적용 대상

DateDiff(String, Nullable<DateTimeOffset>, Nullable<TimeSpan>)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

public:
 static Nullable<int> DateDiff(System::String ^ datePartArg, Nullable<DateTimeOffset> startDate, Nullable<TimeSpan> endDate);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")]
public static int? DateDiff(string datePartArg, DateTimeOffset? startDate, TimeSpan? endDate);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")>]
static member DateDiff : string * Nullable<DateTimeOffset> * Nullable<TimeSpan> -> Nullable<int>
Public Shared Function DateDiff (datePartArg As String, startDate As Nullable(Of DateTimeOffset), endDate As Nullable(Of TimeSpan)) As Nullable(Of Integer)

매개 변수

datePartArg
String

서로 다른 시간 간격 수를 계산할 날짜의 부분입니다.

startDate
Nullable<DateTimeOffset>

첫 번째 날짜입니다.

endDate
Nullable<TimeSpan>

두 번째 날짜입니다.

반품

두 날짜 사이의 시간 간격 수입니다.

특성

설명

이 함수는 직접 호출할 수 없습니다. 이 함수는 LINQ to Entities 쿼리 내에만 나타날 수 있습니다.

이 함수는 데이터베이스의 해당 함수로 변환됩니다. 해당 SQL Server 함수에 대한 자세한 내용은 DATEDIFF(Transact-SQL).;를 참조하세요.

적용 대상

DateDiff(String, Nullable<DateTimeOffset>, String)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

public:
 static Nullable<int> DateDiff(System::String ^ datePartArg, Nullable<DateTimeOffset> startDate, System::String ^ endDate);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")]
public static int? DateDiff(string datePartArg, DateTimeOffset? startDate, string endDate);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")>]
static member DateDiff : string * Nullable<DateTimeOffset> * string -> Nullable<int>
Public Shared Function DateDiff (datePartArg As String, startDate As Nullable(Of DateTimeOffset), endDate As String) As Nullable(Of Integer)

매개 변수

datePartArg
String

서로 다른 시간 간격 수를 계산할 날짜의 부분입니다.

startDate
Nullable<DateTimeOffset>

첫 번째 날짜입니다.

endDate
String

두 번째 날짜입니다.

반품

두 날짜 사이의 시간 간격 수입니다.

특성

설명

이 함수는 직접 호출할 수 없습니다. 이 함수는 LINQ to Entities 쿼리 내에만 나타날 수 있습니다.

이 함수는 데이터베이스의 해당 함수로 변환됩니다. 해당 SQL Server 함수에 대한 자세한 내용은 DATEDIFF(Transact-SQL).;를 참조하세요.

적용 대상

DateDiff(String, Nullable<DateTimeOffset>, Nullable<DateTime>)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

public:
 static Nullable<int> DateDiff(System::String ^ datePartArg, Nullable<DateTimeOffset> startDate, Nullable<DateTime> endDate);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")]
public static int? DateDiff(string datePartArg, DateTimeOffset? startDate, DateTime? endDate);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")>]
static member DateDiff : string * Nullable<DateTimeOffset> * Nullable<DateTime> -> Nullable<int>
Public Shared Function DateDiff (datePartArg As String, startDate As Nullable(Of DateTimeOffset), endDate As Nullable(Of DateTime)) As Nullable(Of Integer)

매개 변수

datePartArg
String

서로 다른 시간 간격 수를 계산할 날짜의 부분입니다.

startDate
Nullable<DateTimeOffset>

첫 번째 날짜입니다.

endDate
Nullable<DateTime>

두 번째 날짜입니다.

반품

두 날짜 사이의 시간 간격 수입니다.

특성

설명

이 함수는 직접 호출할 수 없습니다. 이 함수는 LINQ to Entities 쿼리 내에만 나타날 수 있습니다.

이 함수는 데이터베이스의 해당 함수로 변환됩니다. 해당 SQL Server 함수에 대한 자세한 내용은 DATEDIFF(Transact-SQL).;를 참조하세요.

적용 대상

DateDiff(String, Nullable<DateTime>, String)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

public:
 static Nullable<int> DateDiff(System::String ^ datePartArg, Nullable<DateTime> startDate, System::String ^ endDate);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")]
public static int? DateDiff(string datePartArg, DateTime? startDate, string endDate);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")>]
static member DateDiff : string * Nullable<DateTime> * string -> Nullable<int>
Public Shared Function DateDiff (datePartArg As String, startDate As Nullable(Of DateTime), endDate As String) As Nullable(Of Integer)

매개 변수

datePartArg
String

서로 다른 시간 간격 수를 계산할 날짜의 부분입니다.

startDate
Nullable<DateTime>

첫 번째 날짜입니다.

endDate
String

두 번째 날짜입니다.

반품

두 날짜 사이의 시간 간격 수입니다.

특성

설명

이 함수는 직접 호출할 수 없습니다. 이 함수는 LINQ to Entities 쿼리 내에만 나타날 수 있습니다.

이 함수는 데이터베이스의 해당 함수로 변환됩니다. 해당 SQL Server 함수에 대한 자세한 내용은 DATEDIFF(Transact-SQL).;를 참조하세요.

적용 대상

DateDiff(String, Nullable<DateTime>, Nullable<TimeSpan>)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

public:
 static Nullable<int> DateDiff(System::String ^ datePartArg, Nullable<DateTime> startDate, Nullable<TimeSpan> endDate);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")]
public static int? DateDiff(string datePartArg, DateTime? startDate, TimeSpan? endDate);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")>]
static member DateDiff : string * Nullable<DateTime> * Nullable<TimeSpan> -> Nullable<int>
Public Shared Function DateDiff (datePartArg As String, startDate As Nullable(Of DateTime), endDate As Nullable(Of TimeSpan)) As Nullable(Of Integer)

매개 변수

datePartArg
String

서로 다른 시간 간격 수를 계산할 날짜의 부분입니다.

startDate
Nullable<DateTime>

첫 번째 날짜입니다.

endDate
Nullable<TimeSpan>

두 번째 날짜입니다.

반품

두 날짜 사이의 시간 간격 수입니다.

특성

설명

이 함수는 직접 호출할 수 없습니다. 이 함수는 LINQ to Entities 쿼리 내에만 나타날 수 있습니다.

이 함수는 데이터베이스의 해당 함수로 변환됩니다. 해당 SQL Server 함수에 대한 자세한 내용은 DATEDIFF(Transact-SQL).;를 참조하세요.

적용 대상

DateDiff(String, Nullable<DateTime>, Nullable<DateTimeOffset>)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

public:
 static Nullable<int> DateDiff(System::String ^ datePartArg, Nullable<DateTime> startDate, Nullable<DateTimeOffset> endDate);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")]
public static int? DateDiff(string datePartArg, DateTime? startDate, DateTimeOffset? endDate);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")>]
static member DateDiff : string * Nullable<DateTime> * Nullable<DateTimeOffset> -> Nullable<int>
Public Shared Function DateDiff (datePartArg As String, startDate As Nullable(Of DateTime), endDate As Nullable(Of DateTimeOffset)) As Nullable(Of Integer)

매개 변수

datePartArg
String

서로 다른 시간 간격 수를 계산할 날짜의 부분입니다.

startDate
Nullable<DateTime>

첫 번째 날짜입니다.

endDate
Nullable<DateTimeOffset>

두 번째 날짜입니다.

반품

두 날짜 사이의 시간 간격 수입니다.

특성

설명

이 함수는 직접 호출할 수 없습니다. 이 함수는 LINQ to Entities 쿼리 내에만 나타날 수 있습니다.

이 함수는 데이터베이스의 해당 함수로 변환됩니다. 해당 SQL Server 함수에 대한 자세한 내용은 DATEDIFF(Transact-SQL).;를 참조하세요.

적용 대상

DateDiff(String, Nullable<DateTime>, Nullable<DateTime>)

지정된 시작 날짜와 종료 날짜 사이에 교차된 지정된 datepart 경계의 수를 반환합니다.

public:
 static Nullable<int> DateDiff(System::String ^ datePartArg, Nullable<DateTime> startDate, Nullable<DateTime> endDate);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")]
public static int? DateDiff(string datePartArg, DateTime? startDate, DateTime? endDate);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATEDIFF")>]
static member DateDiff : string * Nullable<DateTime> * Nullable<DateTime> -> Nullable<int>
Public Shared Function DateDiff (datePartArg As String, startDate As Nullable(Of DateTime), endDate As Nullable(Of DateTime)) As Nullable(Of Integer)

매개 변수

datePartArg
String

서로 다른 시간 간격 수를 계산할 날짜의 부분입니다.

startDate
Nullable<DateTime>

첫 번째 날짜입니다.

endDate
Nullable<DateTime>

두 번째 날짜입니다.

반품

두 날짜 사이의 시간 간격 수입니다.

특성

설명

이 함수는 직접 호출할 수 없습니다. 이 함수는 LINQ to Entities 쿼리 내에만 나타날 수 있습니다.

이 함수는 데이터베이스의 해당 함수로 변환됩니다. 해당 SQL Server 함수에 대한 자세한 내용은 DATEDIFF(Transact-SQL).;를 참조하세요.

적용 대상