SqlCeFunctions.DateDiff Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
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.
- 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.
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
Entity Framework