Converts Datetime value in specified time zone to corresponding value in UTC time zone. Input can be a column of Datetime values, a literal Datetime value, or a function returning Datetime values.

Column reference values:

converttoutc(myTimestamp,'US/Mountain')

Output: Returns the UTC values of the myTimestamp converted from US Mountain time zone.

converttoutc(date, 'enum-timezone')


ArgumentRequired?Data TypeDescription
dateYdatetimeName of Datetime column, Datetime literal, or function returning a Datetime value.
enum-timezone-stringYstringCase-sensitive string literal value corresponding to the source time zone.

date

Name of a column containing Datetime values, a literal Datetime value, or a function returning Datetime values to convert.

Tip: Use the DATEFORMAT function to wrap values into acceptable formats. See DATEFORMAT Function.

If an input value is invalid for Datetime data type, a null value is returned. 

Required?Data TypeExample Value
YesDatetime (column reference, function, or literal)sourceTime

enum-timezone-string

String literal value for the time zone from which to convert.

NOTE: These values are case-sensitive.

Example values:

'America/Puerto_Rico'
'US/Eastern'
'US/Central'
'US/Mountain'
'US/Pacific'
'US/Alaska'
'US/Hawaii'

Example - Time zone conversion