EdmFunctions.CreateDateTime 方法

定義

建立 DbFunctionExpression 一個,呼叫標準的「CreateDateTime」函式,並使用指定的參數。 second 必須有結果型態 Edm.Double,而其他參數必須有 Edm.Int32 的結果型別。 該表達式的結果型態為 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

參數

year
DbExpression

一個表示式,提供新 DateTime 實例的年份值。

month
DbExpression

一個表達式,提供新的 DateTime 實例的月份值。

day
DbExpression

一個表示式,提供新的 DateTime 實例的日期值。

hour
DbExpression

一個表示式,提供新的 DateTime 實例的小時值。

minute
DbExpression

一個表示式,提供新的 DateTime 實例的分鐘值。

second
DbExpression

一個表達式,提供新的 DateTime 實例的第二個值。

傳回

一個新的 DbFunctionExpression,根據指定的值回傳新的 DateTime。

例外狀況

yearmonth, , dayhourminute, 或 secondnull

yearmonth, , dayhourminutesecond 均為無效。

適用於