Share via


SqlCeFunctions.DateDiff Method

Definition

Overloads

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

Returns the count of the specified datepart boundaries crossed between the specified start date and end date.

DateDiff(String, Nullable<DateTime>, String)

Returns the count of the specified datepart boundaries crossed between the specified start date and end date.

DateDiff(String, String, Nullable<DateTime>)

Returns the count of the specified datepart boundaries crossed between the specified start date and end date.

DateDiff(String, String, String)

Returns the count of the specified datepart boundaries crossed between the specified start date and end date.

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

Returns the count of the specified datepart boundaries crossed between the specified start date and end date.

[System.Data.Entity.DbFunction("SqlServerCe", "DATEDIFF")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="startDate")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="datePartArg")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="endDate")]
public static Nullable<int> DateDiff (string datePartArg, Nullable<DateTime> startDate, Nullable<DateTime> endDate);
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)

Parameters

datePartArg
String

The part of the date to calculate the differing number of time intervals.

startDate
Nullable<DateTime>

The first date.

endDate
Nullable<DateTime>

The second date.

Returns

The number of time intervals between the two dates.

Attributes

Applies to

DateDiff(String, Nullable<DateTime>, String)

Returns the count of the specified datepart boundaries crossed between the specified start date and end date.

[System.Data.Entity.DbFunction("SqlServerCe", "DATEDIFF")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="datePartArg")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="endDate")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="startDate")]
public static Nullable<int> DateDiff (string datePartArg, Nullable<DateTime> startDate, string endDate);
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)

Parameters

datePartArg
String

The part of the date to calculate the differing number of time intervals.

startDate
Nullable<DateTime>

The first date.

endDate
String

The second date.

Returns

The number of time intervals between the two dates.

Attributes

Applies to

DateDiff(String, String, Nullable<DateTime>)

Returns the count of the specified datepart boundaries crossed between the specified start date and end date.

[System.Data.Entity.DbFunction("SqlServerCe", "DATEDIFF")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="endDate")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="datePartArg")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="startDate")]
public static Nullable<int> DateDiff (string datePartArg, string startDate, Nullable<DateTime> endDate);
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)

Parameters

datePartArg
String

The part of the date to calculate the differing number of time intervals.

startDate
String

The first date.

endDate
Nullable<DateTime>

The second date.

Returns

The number of time intervals between the two dates.

Attributes

Applies to

DateDiff(String, String, String)

Returns the count of the specified datepart boundaries crossed between the specified start date and end date.

[System.Data.Entity.DbFunction("SqlServerCe", "DATEDIFF")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="datePartArg")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="endDate")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="startDate")]
public static Nullable<int> DateDiff (string datePartArg, string startDate, string endDate);
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)

Parameters

datePartArg
String

The part of the date to calculate the differing number of time intervals.

startDate
String

The first date.

endDate
String

The second date.

Returns

The number of time intervals between the two dates.

Attributes

Applies to