TO_TIMESTAMP function in Oracle

TO_TIMESTAMP is one of the vital Conversion functions of Oracle. It is used to convert a string to a timestamp. The TO_TIMESTAMP function is supported in the various versions of the Oracle/PLSQL, including, Oracle 12c, Oracle 11g, Oracle 10g and Oracle 9i.

Syntax:

TO_TIMESTAMP ( char, format_mask, nls_language )

Parameters:
char: It is used to specify the string to be converted.
format_mask: It is an optional parameter which is used to specify the format to be used for conversion.
nls_language: It is an optional parameter which is used to specify the nls language to be used for conversion.

Example:

TO_TIMESTAMP( '2019/06/28 10:16:28', 'YYYY/MM/DD HH:MI:SS')

Output:

 '28-JUN-19 10.16.28.000000000 AM' 

Explanation:
Here, a string is converted to a timestamp value.