Funkce SQL Server DATEFROMPARTS().
Příklad
Vraťte datum z jeho částí:
SELECT DATEFROMPARTS(2018, 10, 31) AS DateFromParts;
Definice a použití
Funkce DATEFROMPARTS() vrací datum ze zadaných částí (hodnoty roku, měsíce a dne).
Syntax
DATEFROMPARTS(year, month, day)
Hodnoty parametrů
Parameter | Description |
---|---|
year | Required. Specifies a year (4 digits) |
month | Required. Specifies a month (from 1 to 12) |
day | Required. Specifies a day (from 1 to 31) |
Technické údaje
Pracuje v: | SQL Server (od roku 2012), Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse |
---|