TIMEFROMPARTS()
Returns a time value for the specified time and with the specified precision.
Signature
TIMEFROMPARTS ( hour, minute, seconds, fractions, precision )Parameters
- hour — Integer expression specifying hours.
- minute — Integer expression specifying minutes.
- seconds — Integer expression specifying seconds.
- fractions — Integer expression specifying fractions.
- precision — Integer literal specifying the precision of the time value to be returned.
Examples
SELECT TIMEFROMPARTS ( 23, 59, 59, 0, 0 ) AS Result;23:59:59Run against SQL Server 16.0.4265.3 on 2026-09-13. This is the output we got, not the documentation’s.
Available on
- SQL Server 2017 and later
- Azure SQL Database
- Azure SQL Managed Instance
- Azure Synapse Analytics
- Analytics Platform System (PDW)
- Fabric SQL database
Signature and description adapted from the Microsoft SQL documentation, used under the CC BY 4.0. SQL Server and Azure are trademarks of the Microsoft group of companies. This page is not affiliated with Microsoft.