共用方式為


SqlFunctions.CurrentTimestamp 方法

定義

傳回目前的日期和時間。

public:
 static Nullable<DateTime> CurrentTimestamp();
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "CURRENT_TIMESTAMP")]
public static DateTime? CurrentTimestamp();
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "CURRENT_TIMESTAMP")>]
static member CurrentTimestamp : unit -> Nullable<DateTime>
Public Shared Function CurrentTimestamp () As Nullable(Of DateTime)

傳回

目前日期和時間。

屬性

備註

您無法直接呼叫此函式。 此函式只能出現在 LINQ to Entities 查詢內。

此函式會轉譯為資料庫中的對應函式。 如需對應 SQL Server 函式的相關信息,請參閱 CURRENT_TIMESTAMP (Transact-SQL)

適用於