SqlFunctions.DateDiff Method

.NET Framework (current version)
 

Returns the number of date and time boundaries crossed between two specified dates.

Namespace:   System.Data.Objects.SqlClient
Assembly:  System.Data.Entity (in System.Data.Entity.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>, Nullable<DateTimeOffset>)

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>, Nullable<TimeSpan>)

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, Nullable<DateTimeOffset>, 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<DateTimeOffset>, Nullable<DateTimeOffset>)

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

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

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

System_CAPS_pubmethodSystem_CAPS_staticDateDiff(String, Nullable<DateTimeOffset>, String)

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

System_CAPS_pubmethodSystem_CAPS_staticDateDiff(String, Nullable<TimeSpan>, 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<TimeSpan>, Nullable<DateTimeOffset>)

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

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

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

System_CAPS_pubmethodSystem_CAPS_staticDateDiff(String, Nullable<TimeSpan>, 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, Nullable<DateTimeOffset>)

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

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.

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database. For information about the corresponding SQL Server function, see DATEDIFF (Transact-SQL).

Return to top
Show: