SqlServerDbFunctionsExtensions.DateFromParts Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the DateTime structure to the specified year, month, day.
Corresponds to SQL Server's DATEFROMPARTS(year, month, day)
.
public static DateTime DateFromParts (this Microsoft.EntityFrameworkCore.DbFunctions _, int year, int month, int day);
static member DateFromParts : Microsoft.EntityFrameworkCore.DbFunctions * int * int * int -> DateTime
<Extension()>
Public Function DateFromParts (_ As DbFunctions, year As Integer, month As Integer, day As Integer) As DateTime
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).
New instance of the DateTime structure to the specified year, month, day.
See Database functions, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.
Product | Versions |
---|---|
Entity Framework Core | 5.0, 6.0, 7.0, 8.0, 9.0 |
Entity Framework feedback
Entity Framework is an open source project. Select a link to provide feedback: