Udostępnij za pośrednictwem


EntityFunctions.CreateDateTime Metoda

Definicja

W przypadku użycia w ramach zapytania LINQ to Entities ta metoda wywołuje funkcję canonical CreateDateTime EDM w celu utworzenia nowego DateTime obiektu.

[System.Data.Entity.DbFunction("Edm", "CreateDateTime")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="day")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="second")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="hour")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="month")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="year")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="minute")]
public static Nullable<DateTime> CreateDateTime (Nullable<int> year, Nullable<int> month, Nullable<int> day, Nullable<int> hour, Nullable<int> minute, Nullable<double> second);
static member CreateDateTime : Nullable<int> * Nullable<int> * Nullable<int> * Nullable<int> * Nullable<int> * Nullable<double> -> Nullable<DateTime>
Public Shared Function CreateDateTime (year As Nullable(Of Integer), month As Nullable(Of Integer), day As Nullable(Of Integer), hour As Nullable(Of Integer), minute As Nullable(Of Integer), second As Nullable(Of Double)) As Nullable(Of DateTime)

Parametry

year
Nullable<Int32>

Rok.

month
Nullable<Int32>

Miesiąc (oparty na 1).

day
Nullable<Int32>

Dzień (oparty na 1).

hour
Nullable<Int32>

Godziny.

minute
Nullable<Int32>

Minuty.

second
Nullable<Double>

Sekundy, w tym części ułamkowe sekund w razie potrzeby.

Zwraca

Nowa data/godzina.

Atrybuty

Uwagi

Nie można wywołać tej funkcji bezpośrednio. Ta funkcja może być wyświetlana tylko w LINQ to Entities zapytaniu. Ta funkcja jest tłumaczona na odpowiednią funkcję w bazie danych.

Dotyczy