Dofactory.com
Dofactory.com
Earn income with your data and sql skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

SQL TIMEFROMPARTS Function

TIMEFROMPARTS returns a time value based on specified time parts.

Time parts include hour, minute, seconds, fractions, and precisions arguments.

Example

#

The example returns a time value from the specified timeparts.

SELECT TIMEFROMPARTS(11, 54, 08, 0, 0) AS Time
Result:  1 record
Time
11:54:08

Syntax

Syntax of the TIMEFROMPARTS function .

TIMEFROMPARTS(hour, minute, seconds, fractions, precision) 

hour -- an integer specifying hour.

minute -- an integer specifying minute.

seconds -- an integer specifying seconds.

fractions -- an integer specifying fractions.

precision -- an integer specifying precision of the returned time value.

Note: TIMEFROMPARTS will return an error if any of the arguments is invalid. If any of the arguments is null, then the return value will also be null.


You may also like



Last updated on Dec 21, 2023

Earn income with your data and sql skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.