toUTC

Returns the string representing a timestamp with time zone resulting from adjusting "string_expression" to the zero-point reference UTC time zone, also known as GMT time. Note that the macro function timestampMask () can be used to trim the output.

Syntax

toUTC ( string_expression ) 

Example 1

# toUTC ( '2005-11-01 12:00:00.000-05:00' ) #

Result

2005-11-01 17:00:00.000000000-00:00

Example 2

# timestampMask( toUTC ( '2005-11-01 12:00:00.000-05:00' ) ,
 'yyyy-mm-dd hh:mm:ss.ff3+hh:mm' ) # 

Result

2005-11-01 17:00:00.000-00:00

Example 3

# toUTC ( $current_timestamp ) #

Result

2005-11-01 17:00:00.000000000-00:00