共用方式為


SqlFunctions.GetUtcDate 方法

定義

傳回目前資料庫系統時間戳記做為 datetime 值。 不包含資料庫時區位移。 這個值代表目前 UTC 時間 (國際標準時間)。 這個值是從執行 SQL Server 執行個體的電腦作業系統得來的。

[System.Data.Entity.DbFunction("SqlServer", "GETUTCDATE")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
public static Nullable<DateTime> GetUtcDate();
static member GetUtcDate : unit -> Nullable<DateTime>
Public Shared Function GetUtcDate () As Nullable(Of DateTime)

傳回

目前的資料庫 UTC 時間戳記。

屬性

適用於