EdmFunctions.CreateDateTimeOffset 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立 DbFunctionExpression 一個,呼叫標準的「CreateDateTimeOffset」函式,並附上指定的參數。
second 必須有結果型態 Edm.Double,而其他參數必須有 Edm.Int32 的結果型別。 該運算式的結果型態為 Edm.DateTimeOffset。
public:
static System::Data::Common::CommandTrees::DbFunctionExpression ^ CreateDateTimeOffset(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, System::Data::Common::CommandTrees::DbExpression ^ timeZoneOffset);
public static System.Data.Common.CommandTrees.DbFunctionExpression CreateDateTimeOffset(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, System.Data.Common.CommandTrees.DbExpression timeZoneOffset);
static member CreateDateTimeOffset : 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.DbExpression -> System.Data.Common.CommandTrees.DbFunctionExpression
Public Function CreateDateTimeOffset (year As DbExpression, month As DbExpression, day As DbExpression, hour As DbExpression, minute As DbExpression, second As DbExpression, timeZoneOffset As DbExpression) As DbFunctionExpression
參數
- year
- DbExpression
一個表示式,提供新的 DateTimeOffset 實例的年份值。
- month
- DbExpression
一個表示式,提供新的 DateTimeOffset 實例的月份值。
- day
- DbExpression
一個表示式,提供新的 DateTimeOffset 實例的日期值。
- hour
- DbExpression
一個表示式,提供新的 DateTimeOffset 實例的小時值。
- minute
- DbExpression
一個表示式,提供新的 DateTimeOffset 實例的分鐘值。
- second
- DbExpression
一個表示式,提供新的 DateTimeOffset 實例的第二個值。
- timeZoneOffset
- DbExpression
一個表達式,提供新 DateTimeOffset 實例時區偏移值的分鐘數。
傳回
一個新的 DbFunctionExpression,根據指定的值回傳新的 DateTimeOffset。
例外狀況
year, month, , dayminutehour, , second, , 或 timeZoneOffset 為 null。
year, month, minuteseconddayhour, 或 timeZoneOffset 無效。