SqlCeFunctions.DateDiff Method

 

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

Namespace:   System.Data.Entity.SqlServerCompact
Assembly:  EntityFramework.SqlServerCompact (in EntityFramework.SqlServerCompact.dll)

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticDateDiff(String, Nullable<DateTime>, Nullable<DateTime>)

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

System_CAPS_pubmethodSystem_CAPS_staticDateDiff(String, Nullable<DateTime>, String)

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

System_CAPS_pubmethodSystem_CAPS_staticDateDiff(String, String, Nullable<DateTime>)

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

System_CAPS_pubmethodSystem_CAPS_staticDateDiff(String, String, String)

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


SqlCeFunctions.DateDiff Method (String, Nullable<DateTime>, Nullable<DateTime>)

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

[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "startDate")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "datePartArg")]
[DbFunctionAttribute("SqlServerCe", "DATEDIFF")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "endDate")]
public static Nullable<int> DateDiff(
	string datePartArg,
	Nullable<DateTime> startDate,
	Nullable<DateTime> endDate
)

Parameters

datePartArg
Type: System.String

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

startDate
Type: System.Nullable<DateTime>

The first date.

endDate
Type: System.Nullable<DateTime>

The second date.

Return Value

Type: System.Nullable<Int32>

The number of time intervals between the two dates.


SqlCeFunctions.DateDiff Method (String, Nullable<DateTime>, String)

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

[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "datePartArg")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "endDate")]
[DbFunctionAttribute("SqlServerCe", "DATEDIFF")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "startDate")]
public static Nullable<int> DateDiff(
	string datePartArg,
	Nullable<DateTime> startDate,
	string endDate
)

Parameters

datePartArg
Type: System.String

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

startDate
Type: System.Nullable<DateTime>

The first date.

endDate
Type: System.String

The second date.

Return Value

Type: System.Nullable<Int32>

The number of time intervals between the two dates.


SqlCeFunctions.DateDiff Method (String, String, Nullable<DateTime>)

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

[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "endDate")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "datePartArg")]
[DbFunctionAttribute("SqlServerCe", "DATEDIFF")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "startDate")]
public static Nullable<int> DateDiff(
	string datePartArg,
	string startDate,
	Nullable<DateTime> endDate
)

Parameters

datePartArg
Type: System.String

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

startDate
Type: System.String

The first date.

endDate
Type: System.Nullable<DateTime>

The second date.

Return Value

Type: System.Nullable<Int32>

The number of time intervals between the two dates.


SqlCeFunctions.DateDiff Method (String, String, String)

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

[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "datePartArg")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "endDate")]
[DbFunctionAttribute("SqlServerCe", "DATEDIFF")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "startDate")]
public static Nullable<int> DateDiff(
	string datePartArg,
	string startDate,
	string endDate
)

Parameters

datePartArg
Type: System.String

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

startDate
Type: System.String

The first date.

endDate
Type: System.String

The second date.

Return Value

Type: System.Nullable<Int32>

The number of time intervals between the two dates.