Excerpt |
---|
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. |
- Inputs with time zone offsets are invalid.
- Specified time zone must be a string literal of one of the supported time zone values.
Column reference values:
D lang syntax |
---|
RawWrangle | true |
---|
Type | ref |
---|
showNote | true |
---|
WrangleText | derive type:single value:converttoutc(myTimestamp,'US/Mountain') |
---|
|
converttoutc(myTimestamp,'US/Mountain') |
Output: Returns the UTC values of the myTimestamp
converted from US Mountain time zone.
D lang syntax |
---|
RawWrangle | true |
---|
Type | syntax |
---|
showNote | true |
---|
WrangleText | derive type:single value:dateformat(time(hour_integer_col,minute_integer_col,second_integer_col ),'time_format_string') |
---|
|
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. |
date
Name of a column containing Datetime values, a literal Datetime value, or a function returning Datetime values to convert.
Tip |
---|
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.
- Column references with time zone offsets are invalid.
- Missing values for this function in the source data result in missing values in the output.
- Multiple columns and wildcards are not supported.
Required? | Data Type | Example Value |
---|
Yes | Datetime (column reference, function, or literal) | sourceTime |
enum-timezone-string
String literal value for the time zone from which to convert.
Info |
---|
NOTE: These values are case-sensitive. |
Example values:
Code Block |
---|
'America/Puerto_Rico'
'US/Eastern'
'US/Central'
'US/Mountain'
'US/Pacific'
'US/Alaska'
'US/Hawaii' |
Example - Time zone conversion
Include Page |
---|
| EXAMPLE - Time Zone Conversion Functions |
---|
| EXAMPLE - Time Zone Conversion Functions |
---|
|