Jazyk

SqlServerDbFunctionsExtensions.DateTimeFromParts Metoda

Definice

Inicializuje novou instanci DateTime struktury na zadaný rok, měsíc, den, hodinu, minutu, sekundu a milisekundu. Odpovídá SQL Server DATETIMEFROMPARTS(year, month, day, hour, minute, second, millisecond).

public static DateTime DateTimeFromParts(this Microsoft.EntityFrameworkCore.DbFunctions _, int year, int month, int day, int hour, int minute, int second, int millisecond);
static member DateTimeFromParts : Microsoft.EntityFrameworkCore.DbFunctions * int * int * int * int * int * int * int -> DateTime
<Extension()>
Public Function DateTimeFromParts (_ As DbFunctions, year As Integer, month As Integer, day As Integer, hour As Integer, minute As Integer, second As Integer, millisecond As Integer) As DateTime

Parametry

_
DbFunctions

Instance DbFunctions.

year
Int32

Rok (1753 až 9999).

month
Int32

Měsíc (1 až 12).

day
Int32

Den (1 až počet dní v měsíci).

hour
Int32

Hodiny (0 až 23).

minute
Int32

Minuty (0 až 59).

second
Int32

Sekundy (0 až 59).

millisecond
Int32

Milisekundy (0 až 999).

Návraty

Nová instance DateTime struktury pro zadaný rok, měsíc, den, hodinu, minutu, sekundu a milisekundu.

Poznámky

Další informace a příklady najdete v tématu Databázové funkce a přístup k databázím SQL Server a Azure SQL s EF Core.

Platí pro