通过


EntityFunctions.CreateDateTime 方法

定义

调用规范 CreateDateTime 函数。 有关规范 CreateDateTime 函数的信息,请参阅 日期和时间规范函数

public:
 static Nullable<DateTime> CreateDateTime(Nullable<int> year, Nullable<int> month, Nullable<int> day, Nullable<int> hour, Nullable<int> minute, Nullable<double> second);
[System.Data.Objects.DataClasses.EdmFunction("Edm", "CreateDateTime")]
public static DateTime? CreateDateTime(int? year, int? month, int? day, int? hour, int? minute, double? second);
[<System.Data.Objects.DataClasses.EdmFunction("Edm", "CreateDateTime")>]
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)

参数

year
Nullable<Int32>

新日期的年份部分。

month
Nullable<Int32>

新日期的月份部分。

day
Nullable<Int32>

新日期的日期部分。

hour
Nullable<Int32>

新日期的小时部分。

minute
Nullable<Int32>

新日期的分钟部分。

second
Nullable<Double>

新日期的秒部分。 请注意,可以使用此参数指定秒的分数。

返回

新日期。

属性

注解

不能直接调用此函数。 此函数只能在 LINQ to Entities 查询中显示。

此函数将转换为数据库中的相应函数。

适用于