SQL Notebook (logo)

DATETIMEOFFSETFROMPARTS Function

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

Syntax

DATETIMEOFFSETFROMPARTS(year, month, day, hour, minute, second, millisecond, hour-offset, minute-offset)

Arguments

Return Value

A date/time string with time zone offset formatted like "2015-01-02 05:45:30.123 -04:00".

Examples