Export (0) Print
Expand All

SqlFunctions.DateDiff Method

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

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
Public method Static member DateDiff(String, Nullable<DateTime>, Nullable<DateTime>) Returns the count of the specified datepart boundaries crossed between the specified start date and end date.
Public method Static member DateDiff(String, Nullable<DateTime>, Nullable<DateTimeOffset>) Returns the count of the specified datepart boundaries crossed between the specified start date and end date.
Public method Static member DateDiff(String, Nullable<DateTime>, Nullable<TimeSpan>) Returns the count of the specified datepart boundaries crossed between the specified start date and end date.
Public method Static member DateDiff(String, Nullable<DateTime>, String) Returns the count of the specified datepart boundaries crossed between the specified start date and end date.
Public method Static member DateDiff(String, Nullable<DateTimeOffset>, Nullable<DateTime>) Returns the count of the specified datepart boundaries crossed between the specified start date and end date.
Public method Static member DateDiff(String, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>) Returns the count of the specified datepart boundaries crossed between the specified start date and end date.
Public method Static member DateDiff(String, Nullable<DateTimeOffset>, Nullable<TimeSpan>) Returns the count of the specified datepart boundaries crossed between the specified start date and end date.
Public method Static member DateDiff(String, Nullable<DateTimeOffset>, String) Returns the count of the specified datepart boundaries crossed between the specified start date and end date.
Public method Static member DateDiff(String, Nullable<TimeSpan>, Nullable<DateTime>) Returns the count of the specified datepart boundaries crossed between the specified start date and end date.
Public method Static member DateDiff(String, Nullable<TimeSpan>, Nullable<DateTimeOffset>) Returns the count of the specified datepart boundaries crossed between the specified start date and end date.
Public method Static member DateDiff(String, Nullable<TimeSpan>, Nullable<TimeSpan>) Returns the count of the specified datepart boundaries crossed between the specified start date and end date.
Public method Static member DateDiff(String, Nullable<TimeSpan>, String) Returns the count of the specified datepart boundaries crossed between the specified start date and end date.
Public method Static member DateDiff(String, String, Nullable<DateTime>) Returns the count of the specified datepart boundaries crossed between the specified start date and end date.
Public method Static member DateDiff(String, String, Nullable<DateTimeOffset>) Returns the count of the specified datepart boundaries crossed between the specified start date and end date.
Public method Static member DateDiff(String, String, Nullable<TimeSpan>) Returns the count of the specified datepart boundaries crossed between the specified start date and end date.
Public method Static member DateDiff(String, String, String) Returns the count of the specified datepart boundaries crossed between the specified start date and end date.
Top

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

Show:
© 2014 Microsoft