DbFunctions.CreateDateTime(Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Double>) DbFunctions.CreateDateTime(Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Double>) DbFunctions.CreateDateTime(Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Double>) Method

Definition

When used as part of a LINQ to Entities query, this method invokes the canonical CreateDateTime EDM function to create a new DateTime object.

[System.Data.Entity.DbFunction("Edm", "CreateDateTime")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="minute")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="second")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="day")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="hour")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="year")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="month")]
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)

Parameters

year
Nullable<Int32>

The year.

month
Nullable<Int32>

The month (1-based).

day
Nullable<Int32>

The day (1-based).

hour
Nullable<Int32>

The hours.

minute
Nullable<Int32>

The minutes.

second
Nullable<Double>

The seconds, including fractional parts of the seconds if desired.

Returns

The new date/time.

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database.

Applies to