SMALLDATETIMEFROMPARTS
date/time arithmetic, parts, construction or truncation
What changes
- Input
- date/time arguments
- Output or change
- date/time or integer value
- Return type
- smalldatetime
Syntax at a glance
SMALLDATETIMEFROMPARTS ( year, month, day, hour, minute )
Work example
Build a smalldatetime value from parts for a legacy column.
Test month end, leap day, offset, and the session language that will run the query.
Check your work Check its narrow range and minute rounding before passing second-level input.
Open Microsoft Learn for full syntax, permissions, and details for your version.