Share via


SqlServerDbFunctionsExtensions.DateTimeOffsetFromParts Method

Definition

Initializes a new instance of the DateTimeOffset structure to the specified year, month, day, hour, minute, second, fractions, hourOffset, minuteOffset and precision. Corresponds to SQL Server's 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

Parameters

_
DbFunctions

The DbFunctions instance.

year
Int32

The year (1753 through 9999).

month
Int32

The month (1 through 12).

day
Int32

The day (1 through the number of days in month).

hour
Int32

The hours (0 through 23).

minute
Int32

The minutes (0 through 59).

second
Int32

The seconds (0 through 59).

fractions
Int32

The fractional seconds (0 through 9999999).

hourOffset
Int32

The hour portion of the time zone offset (-14 through +14).

minuteOffset
Int32

The minute portion of the time zone offset (0 or 30).

precision
Int32

The precision of the datetimeoffset value (0 through 7).

Returns

New instance of the DateTimeOffset structure to the specified year, month, day, hour, minute, second, fractions, hourOffset, minuteOffset and precision.

Remarks

See Database functions, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.

Applies to