SqlServerDbFunctionsExtensions.DateTimeOffsetFromParts 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化結構的新實例 DateTimeOffset ,設定為指定的年份、月份、日、時、分鐘、秒、分數、小時偏移、分鐘偏移及精確度。
對應於 SQL Server
DATETIMEOFFSETFROMPARTS(year, month, day, hour, minute, seconds, fractions, hour_offset,
minute_offset, precision)
.
public static DateTimeOffset DateTimeOffsetFromParts(this Microsoft.EntityFrameworkCore.DbFunctions _, int year, int month, int day, int hour, int minute, int second, int fractions, int hourOffset, int minuteOffset, int precision);
static member DateTimeOffsetFromParts : Microsoft.EntityFrameworkCore.DbFunctions * int * int * int * int * int * int * int * int * int * int -> DateTimeOffset
<Extension()>
Public Function DateTimeOffsetFromParts (_ As DbFunctions, year As Integer, month As Integer, day As Integer, hour As Integer, minute As Integer, second As Integer, fractions As Integer, hourOffset As Integer, minuteOffset As Integer, precision As Integer) As DateTimeOffset
參數
DbFunctions 執行個體。
- year
- Int32
年份(1753年至9999年)。
- month
- Int32
月份 (1 到 12) 。
- day
- Int32
日數(1 到月份的天數)。
- hour
- Int32
小時 (0 到 23) 。
- minute
- Int32
分鐘 (0 到 59) 。
- second
- Int32
秒(0 到 59)。
- fractions
- Int32
分秒(0到9999999)。
- hourOffset
- Int32
時區的整點部分(-14 到 +14)。
- minuteOffset
- Int32
時區偏移的分鐘部分(0或30)。
- precision
- Int32
日期時間偏移值(0 到 7)的精度。
傳回
為指定的年份、月份、日、時、分鐘、秒、分數、小時偏移、分鐘偏移及精確度提供結構的新實例 DateTimeOffset 。
備註
更多資訊與範例請參閱「資料庫函數」及「使用 EF Core 存取 SQL Server 與 Azure SQL 資料庫」。