Επεξεργασία

Κοινή χρήση μέσω


SqlMethods.DateDiffMicrosecond Method

Definition

Counts the number of microsecond boundaries between two specified dates.

Overloads

DateDiffMicrosecond(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

Counts the number of microsecond boundaries between two nullable dates.

DateDiffMicrosecond(Nullable<DateTime>, Nullable<DateTime>)

Counts the number of microsecond boundaries between two nullable dates.

DateDiffMicrosecond(DateTime, DateTime)

Counts the number of microsecond boundaries between two non-nullable dates.

DateDiffMicrosecond(DateTimeOffset, DateTimeOffset)

Counts the number of microsecond boundaries between two non-nullable dates.

Remarks

Corresponds to the SQL Server DATEDIFF function using millisecond to specify the type of time boundary crossed. For more about this SQL Server function, see DATEDIFF.

DateDiffMicrosecond(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

Counts the number of microsecond boundaries between two nullable dates.

public:
 static Nullable<int> DateDiffMicrosecond(Nullable<DateTimeOffset> startDate, Nullable<DateTimeOffset> endDate);
public static int? DateDiffMicrosecond (DateTimeOffset? startDate, DateTimeOffset? endDate);
static member DateDiffMicrosecond : Nullable<DateTimeOffset> * Nullable<DateTimeOffset> -> Nullable<int>
Public Shared Function DateDiffMicrosecond (startDate As Nullable(Of DateTimeOffset), endDate As Nullable(Of DateTimeOffset)) As Nullable(Of Integer)

Parameters

startDate
Nullable<DateTimeOffset>

The start date for the time period.

endDate
Nullable<DateTimeOffset>

The end date for the time period.

Returns

When both parameters are not null, returns the number of microsecond boundaries between the two specified dates. When one or both parameters are null, returns a null value.

Remarks

Corresponds to the SQL Server DATEDIFF function using microsecond to specify the type of time boundary crossed. For more about this SQL Server function, see DATEDIFF.

Applies to

DateDiffMicrosecond(Nullable<DateTime>, Nullable<DateTime>)

Counts the number of microsecond boundaries between two nullable dates.

public:
 static Nullable<int> DateDiffMicrosecond(Nullable<DateTime> startDate, Nullable<DateTime> endDate);
public static int? DateDiffMicrosecond (DateTime? startDate, DateTime? endDate);
static member DateDiffMicrosecond : Nullable<DateTime> * Nullable<DateTime> -> Nullable<int>
Public Shared Function DateDiffMicrosecond (startDate As Nullable(Of DateTime), endDate As Nullable(Of DateTime)) As Nullable(Of Integer)

Parameters

startDate
Nullable<DateTime>

The start date for the time period.

endDate
Nullable<DateTime>

The end date for the time period.

Returns

When both parameters are not null, returns the number of microsecond boundaries between the two specified dates. When one or both parameters are null, returns a null value.

Remarks

Corresponds to the SQL Server DATEDIFF function using microsecond to specify the type of time boundary crossed. For more about this SQL Server function, see DATEDIFF.

Applies to

DateDiffMicrosecond(DateTime, DateTime)

Counts the number of microsecond boundaries between two non-nullable dates.

public:
 static int DateDiffMicrosecond(DateTime startDate, DateTime endDate);
public static int DateDiffMicrosecond (DateTime startDate, DateTime endDate);
static member DateDiffMicrosecond : DateTime * DateTime -> int
Public Shared Function DateDiffMicrosecond (startDate As DateTime, endDate As DateTime) As Integer

Parameters

startDate
DateTime

The start date for the time period.

endDate
DateTime

The end date for the time period.

Returns

The number of microsecond boundaries between the two specified dates.

Remarks

Corresponds to the SQL Server DATEDIFF function using microsecond to specify the type of time boundary crossed. For more about this SQL Server function, see DATEDIFF.

Applies to

DateDiffMicrosecond(DateTimeOffset, DateTimeOffset)

Counts the number of microsecond boundaries between two non-nullable dates.

public:
 static int DateDiffMicrosecond(DateTimeOffset startDate, DateTimeOffset endDate);
public static int DateDiffMicrosecond (DateTimeOffset startDate, DateTimeOffset endDate);
static member DateDiffMicrosecond : DateTimeOffset * DateTimeOffset -> int
Public Shared Function DateDiffMicrosecond (startDate As DateTimeOffset, endDate As DateTimeOffset) As Integer

Parameters

startDate
DateTimeOffset

The start date for the time period.

endDate
DateTimeOffset

The end date for the time period.

Returns

The number of microsecond boundaries between the two specified dates.

Remarks

Corresponds to the SQL Server DATEDIFF function using microsecond to specify the type of time boundary crossed. For more about this SQL Server function, see DATEDIFF.

Applies to