SqlFunctions.GetDate 方法

定义

将当前数据库系统时间戳作为日期/时间值返回,不含数据库时区偏移量。 此值派生自运行 SQL Server 实例的计算机上使用的操作系统。

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

返回

当前的数据库时间戳。

属性

适用于