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 對 Entities 查詢中。

這個函式會被轉換成資料庫中的對應函式。 關於對應SQL Server函數的資訊,請參見 CURRENT_TIMESTAMP (Transact-SQL)

適用於