SqlFunctions.GetDate 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
傳回目前資料庫系統時間戳記做為 datetime 值 (沒有資料庫時區位移)。 這個值是從執行 SQL Server 執行個體的電腦作業系統得來的。
public:
static Nullable<DateTime> GetDate();
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "GETDATE")]
public static DateTime? GetDate();
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "GETDATE")>]
static member GetDate : unit -> Nullable<DateTime>
Public Shared Function GetDate () As Nullable(Of DateTime)
傳回
目前的資料庫時間戳記。
- 屬性
備註
您無法直接呼叫此函式。 此函式只能出現在 LINQ to Entities 查詢中。
此函式會轉譯為資料庫中的對應函式。 如需對應 SQL Server 函式的相關信息,請參閱 GETDATE (Transact-SQL) 。