T-SQL Tutorial

T-SQL SmallDateTimeFromParts


The T-SQL SmallDateTimeFromParts is an date function and returns a smalldatetime value for the specified date and time.

SmallDateTimeFromParts Syntax:

SMALLDATETIMEFROMPARTS( year, month, day, hour, minute )

SmallDateTimeFromParts Example:

SELECT SMALLDATETIMEFROMPARTS ( 2014, 03, 01, 15, 50 ) AS Result;

Result
2014-03-01 15:50:00