Converts Datetime value to corresponding value of the specified time zone. Input can be a column of Datetime values, a literal Datetime value, or a function returning Datetime values. |
Column reference values:
convertfromutc(myUTCtimestamp,'US/Eastern') |
Output: Returns the values of the myUTCtimestamp
converted to US Eastern time zone.
convertfromutc(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 target 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. |
Values are assumed to be in UTC time zone format. Coordinated Universal Time is the primary standard time by which clocks are coordinated around the world.
If an input value is invalid for Datetime data type, a null value is returned.
Column references with time zone offsets are invalid.
Required? | Data Type | Example Value |
---|---|---|
Yes | Datetime (column reference, function, or literal) | sourceTime |
String literal value for the time zone to 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.