SqlMethods.DateDiffMicrosecond 方法

定義

計算兩個指定之日期間的微秒界限數。

多載

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

計算兩個可為 null 的日期之間的微秒界限數。

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

計算兩個可為 null 的日期之間的微秒界限數。

DateDiffMicrosecond(DateTime, DateTime)

計算兩個不可為 null 的日期之間的微秒界限數。

DateDiffMicrosecond(DateTimeOffset, DateTimeOffset)

計算兩個不可為 null 的日期之間的微秒界限數。

備註

對應至SQL Server DATEDIFF 函式,使用 millisecond 來指定跨時間界限的類型。 如需此SQL Server函式的詳細資訊,請參閱DATEDIFF

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

計算兩個可為 null 的日期之間的微秒界限數。

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)

參數

startDate
Nullable<DateTimeOffset>

時間週期的開始日期。

endDate
Nullable<DateTimeOffset>

時間週期的結束日期。

傳回

當兩個參數都不是 null 時,傳回兩個指定之日期間的微秒界限數。 當參數的其中一個或兩個都是 null 時,傳回 null 值。

備註

對應至SQL Server DATEDIFF 函式,使用 microsecond 來指定跨時間界限的類型。 如需此SQL Server函式的詳細資訊,請參閱DATEDIFF

適用於

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

計算兩個可為 null 的日期之間的微秒界限數。

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)

參數

startDate
Nullable<DateTime>

時間週期的開始日期。

endDate
Nullable<DateTime>

時間週期的結束日期。

傳回

當兩個參數都不是 null 時,傳回兩個指定之日期間的微秒界限數。 當參數的其中一個或兩個都是 null 時,傳回 null 值。

備註

對應至SQL Server DATEDIFF 函式,使用 microsecond 來指定跨時間界限的類型。 如需此SQL Server函式的詳細資訊,請參閱DATEDIFF

適用於

DateDiffMicrosecond(DateTime, DateTime)

計算兩個不可為 null 的日期之間的微秒界限數。

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

參數

startDate
DateTime

時間週期的開始日期。

endDate
DateTime

時間週期的結束日期。

傳回

兩個指定之日期間的微秒界限數。

備註

對應至SQL Server DATEDIFF 函式,使用 microsecond 來指定跨時間界限的類型。 如需此SQL Server函式的詳細資訊,請參閱DATEDIFF

適用於

DateDiffMicrosecond(DateTimeOffset, DateTimeOffset)

計算兩個不可為 null 的日期之間的微秒界限數。

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

參數

startDate
DateTimeOffset

時間週期的開始日期。

endDate
DateTimeOffset

時間週期的結束日期。

傳回

兩個指定之日期間的微秒界限數。

備註

對應至SQL Server DATEDIFF 函式,使用 microsecond 來指定跨時間界限的類型。 如需此SQL Server函式的詳細資訊,請參閱DATEDIFF

適用於