Język

SqlServerDbFunctionsExtensions.AtTimeZone Metoda

Definicja

Przeciążenia

Nazwisko Opis
AtTimeZone(DbFunctions, DateTime, String)

Konwertuje dateTime na odpowiadający datetimeoffset element docelowy timeZone. Odpowiada konstrukcji SQL ServerAT TIME ZONE.

AtTimeZone(DbFunctions, DateTimeOffset, String)

Konwertuje dateTimeOffset na strefę czasową określoną przez timeZone. Odpowiada konstrukcji SQL ServerAT TIME ZONE.

AtTimeZone(DbFunctions, DateTime, String)

Źródło:
SqlServerDbFunctionsExtensions.cs
Źródło:
SqlServerDbFunctionsExtensions.cs
Źródło:
SqlServerDbFunctionsExtensions.cs
Źródło:
SqlServerDbFunctionsExtensions.cs
Źródło:
SqlServerDbFunctionsExtensions.cs

Konwertuje dateTime na odpowiadający datetimeoffset element docelowy timeZone. Odpowiada konstrukcji SQL ServerAT TIME ZONE.

public static DateTimeOffset AtTimeZone(this Microsoft.EntityFrameworkCore.DbFunctions _, DateTime dateTime, string timeZone);
static member AtTimeZone : Microsoft.EntityFrameworkCore.DbFunctions * DateTime * string -> DateTimeOffset
<Extension()>
Public Function AtTimeZone (_ As DbFunctions, dateTime As DateTime, timeZone As String) As DateTimeOffset

Parametry

_
DbFunctions

Instancja DbFunctions.

dateTime
DateTime

Wartość, która ma być konwertowana na datetimeoffset.

timeZone
String

Prawidłowy identyfikator strefy czasowej SQL Server.

Zwraca

Wynik datetimeoffset konwersji.

Uwagi

Należy pamiętać, że wartość Kind elementu dateTime nie jest brana pod uwagę podczas przeprowadzania konwersji; przesunięcie dla podanej strefy czasowej jest po prostu stosowane as-is.

Zobacz Funkcje bazy danych oraz Uzyskiwanie dostępu do SQL Server i Azure SQL baz danych za pomocą programu EF Core, aby uzyskać więcej informacji i przykładów.

Dotyczy

AtTimeZone(DbFunctions, DateTimeOffset, String)

Źródło:
SqlServerDbFunctionsExtensions.cs
Źródło:
SqlServerDbFunctionsExtensions.cs
Źródło:
SqlServerDbFunctionsExtensions.cs
Źródło:
SqlServerDbFunctionsExtensions.cs
Źródło:
SqlServerDbFunctionsExtensions.cs

Konwertuje dateTimeOffset na strefę czasową określoną przez timeZone. Odpowiada konstrukcji SQL ServerAT TIME ZONE.

public static DateTimeOffset AtTimeZone(this Microsoft.EntityFrameworkCore.DbFunctions _, DateTimeOffset dateTimeOffset, string timeZone);
static member AtTimeZone : Microsoft.EntityFrameworkCore.DbFunctions * DateTimeOffset * string -> DateTimeOffset
<Extension()>
Public Function AtTimeZone (_ As DbFunctions, dateTimeOffset As DateTimeOffset, timeZone As String) As DateTimeOffset

Parametry

_
DbFunctions

Instancja DbFunctions.

dateTimeOffset
DateTimeOffset

Wartość, na której ma być wykonywana konwersja strefy czasowej.

timeZone
String

Prawidłowy identyfikator strefy czasowej SQL Server.

Zwraca

Wynik datetimeoffset konwersji.

Uwagi

Zobacz Funkcje bazy danych oraz Uzyskiwanie dostępu do SQL Server i Azure SQL baz danych za pomocą programu EF Core, aby uzyskać więcej informacji i przykładów.

Dotyczy