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') |
Argument | Required? | Data Type | Description |
---|---|---|---|
date | Y | datetime | Name of Datetime column, Datetime literal, or function returning a Datetime value. |
enum-timezone-string | Y | string | Case-sensitive string literal value corresponding to the source time zone. |
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 Type | Example Value |
---|---|---|
Yes | Datetime (column reference, function, or literal) | sourceTime |
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' |
For more information on supported time formatting strings, see Supported Data Types.