SQL Notebook (logo)

DATETIMEFROMPARTS Function

Returns a string formatted like "2015-12-25 06:54:47.152" based on the provided date and time values.

Syntax

DATETIMEFROMPARTS(year, month, day, hour, minute, second, millisecond)

Arguments

Return Value

A date/time string (without time zone offset) formatted like "2015-01-02 05:45:30.123".

Examples