User Tools

Site Tools

A PCRE internal error occured. This might be caused by a faulty plugin

Sidebar

**HPL/SQL is included to Apache Hive since version 2.0** * [[home|Home]]\\ * [[why|Why HPL/SQL]]\\ * [[features|Key Features]]\\ * [[start|Get Started]]\\ * [[doc|HPL/SQL Reference]]\\ * [[download|Download]]\\ * [[new|What's New]]\\ * [[about|About]]

from-unixtime

====== FROM_UNIXTIME Function ====== FROM_UNIXTIME function converts the specified number of seconds since 1970-01-01 00:00:00 to timestamp value. **Syntax**: <code language="sql"> FROM_UNIXTIME(epoch, [format]) </code> **Parameters**: * //epoch// is the number of seconds since 1970-01-01 00:00:00 * //format// is the timestamp format, optional. The default format is yyyy-MM-dd HH:mm:ss **Return Type:** STRING **Example**: Convert the number of seconds to timestamp value: <code language="sql"> from_unixtime(1447141681); --- 2015-11-10 04:48:01 from_unixtime(1447141681, 'yyyy-MM-dd'); --- 2015-11-10 </code> **Compatibility**: Hive. **Version:** HPL/SQL 0.3.17 See also: * [[current-date|CURRENT_DATE]] * [[current-timestamp|CURRENT_TIMESTAMP]] * [[now|NOW]] * [[sysdate|SYSDATE]] * [[unix-timestamp|UNIX_TIMESTAMP]]