EntityFunctions.CreateDateTime Method (Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Double>)
When used as part of a LINQ to Entities query, this method invokes the canonical CreateDateTime EDM function to create a new DateTime object.
Assembly: EntityFramework (in EntityFramework.dll)
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "minute")] [SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "second")] [SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "day")] [SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "hour")] [DbFunctionAttribute("Edm", "CreateDateTime")] [SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "year")] [SuppressMessageAttribute("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 )
Parameters
- year
-
Type:
System.Nullable<Int32>
The year.
- month
-
Type:
System.Nullable<Int32>
The month (1-based).
- day
-
Type:
System.Nullable<Int32>
The day (1-based).
- hour
-
Type:
System.Nullable<Int32>
The hours.
- minute
-
Type:
System.Nullable<Int32>
The minutes.
- second
-
Type:
System.Nullable<Double>
The seconds, including fractional parts of the seconds if desired.
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.