Edit

Share via


EdmFunctions.CreateDateTime Method

Definition

Creates a DbFunctionExpression that invokes the canonical 'CreateDateTime' function with the specified arguments. second must have a result type of Edm.Double, while all other arguments must have a result type of Edm.Int32. The result type of the expression is Edm.DateTime.

public:
 static System::Data::Common::CommandTrees::DbFunctionExpression ^ CreateDateTime(System::Data::Common::CommandTrees::DbExpression ^ year, System::Data::Common::CommandTrees::DbExpression ^ month, System::Data::Common::CommandTrees::DbExpression ^ day, System::Data::Common::CommandTrees::DbExpression ^ hour, System::Data::Common::CommandTrees::DbExpression ^ minute, System::Data::Common::CommandTrees::DbExpression ^ second);
public static System.Data.Common.CommandTrees.DbFunctionExpression CreateDateTime (System.Data.Common.CommandTrees.DbExpression year, System.Data.Common.CommandTrees.DbExpression month, System.Data.Common.CommandTrees.DbExpression day, System.Data.Common.CommandTrees.DbExpression hour, System.Data.Common.CommandTrees.DbExpression minute, System.Data.Common.CommandTrees.DbExpression second);
static member CreateDateTime : System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbExpression -> System.Data.Common.CommandTrees.DbFunctionExpression
Public Function CreateDateTime (year As DbExpression, month As DbExpression, day As DbExpression, hour As DbExpression, minute As DbExpression, second As DbExpression) As DbFunctionExpression

Parameters

year
DbExpression

An expression that provides the year value for the new DateTime instance.

month
DbExpression

An expression that provides the month value for the new DateTime instance.

day
DbExpression

An expression that provides the day value for the new DateTime instance.

hour
DbExpression

An expression that provides the hour value for the new DateTime instance.

minute
DbExpression

An expression that provides the minute value for the new DateTime instance.

second
DbExpression

An expression that provides the second value for the new DateTime instance.

Returns

A new DbFunctionExpression that returns a new DateTime based on the specified values.

Exceptions

year, month, day, hour, minute, or second is null.

year, month, day, hour, minute, or second is invalid.

Applies to