All Products
Search
Document Center

TO_TIMESTAMP_TZ

Last Updated: Jun 18, 2021

The TO_TIMESTAMP function converts a string to the TIMESTAMP WITH TIME ZONE data type, including information about time zones.

Syntax

TO_TIMESTAMP_TZ (char,[fmt],['nlsparam'])

Parameters

Parameter

Description

char

The string of the CHAR, VARCHAR2, NCHAR, or NVARCHAR2 data type.

fmt

Specifies the output format.

nlsparam

Controls the language of the returned month and day.

Return type

TIMESTAMP WITH TIME ZONE data type

Examples

Execute the following statement:

SELECT TO_TIMESTAMP_TZ ('10-Sep-02 14:10:10.123000', 'DD-Mon-RR HH24:MI:SS.FF') FROM DUAL;

The following query result is returned:

+----------------------------------------------------------------------+
| TO_TIMESTAMP_TZ('10-SEP-0214:10:10.123000','DD-MON-RRHH24:MI:SS.FF') |
+----------------------------------------------------------------------+
| 2002-09-10 14:10:10.123000000 +08:00                                 |
+----------------------------------------------------------------------+