Apache Hive : HPL/SQL - CURRENT_TIMESTAMP Function

Last updated: August 12, 2026

Apache Hive : HPL/SQL - CURRENT_TIMESTAMP Function

CURRENT_TIMESTAMP function returns the current date and time (year, month, day, hour, minute, seconds and fractional seconds).

Syntax:

CURRENT_TIMESTAMP | CURRENT TIMESTAMP [(precision)] 

Parameters:

ParameterValueDescription
precisionVariable or expressionFractional seconds precision, from 0 to 3Default 3

Return Type:

TIMESTAMP

Example:

Get the current and date and time without fraction:

CURRENT_TIMESTAMP(0)
--
2015-03-02 13:04:42

Compatibility: Oracle, IBM DB2, Teradata, MySQL.

See also: