Condividi tramite


Metodo SqlFunctions.GetUtcDate

[Questa pagina è specifica della versione 6 di Entity Framework. La versione più recente è disponibile come pacchetto NuGet per "Entity Framework". Per ulteriori informazioni su Entity Framework, vedere la pagina msdn.com/data/ef.]

Restituisce il timestamp di sistema del database corrente come valore datetime. La differenza di fuso orario del database non è inclusa. Il valore rappresenta l'ora UTC (Coordinated Universal Time) corrente. Il valore deriva dal sistema operativo del computer in cui è in esecuzione l'istanza di SQL Server.

Spazio dei nomi:  System.Data.Entity.SqlServer
Assembly:  EntityFramework.SqlServer (in EntityFramework.SqlServer.dll)

Sintassi

'Dichiarazione
<SuppressMessageAttribute("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")> _
<DbFunctionAttribute("SqlServer", "GETUTCDATE")> _
Public Shared Function GetUtcDate As Nullable(Of DateTime)
'Utilizzo
Dim returnValue As Nullable(Of DateTime)

returnValue = SqlFunctions.GetUtcDate()
[SuppressMessageAttribute("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
[DbFunctionAttribute("SqlServer", "GETUTCDATE")]
public static Nullable<DateTime> GetUtcDate()
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1024:UsePropertiesWhereAppropriate")]
[DbFunctionAttribute(L"SqlServer", L"GETUTCDATE")]
public:
static Nullable<DateTime> GetUtcDate()
[<SuppressMessageAttribute("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")>]
[<DbFunctionAttribute("SqlServer", "GETUTCDATE")>]
static member GetUtcDate : unit -> Nullable<DateTime> 
public static function GetUtcDate() : Nullable<DateTime>

Valore restituito

Tipo: System.Nullable<DateTime>
Timestamp UTC del database corrente.

Vedere anche

Riferimento

SqlFunctions Classe

Spazio dei nomi System.Data.Entity.SqlServer