TO_TIMESTAMP

Converts a Unix timestamp to a SQL timestamp in 'YYYY-MM-DD HH:MM:SS' format.

Syntax

TO_TIMESTAMP(unixEpoch)

Parameters

unixEpoch

A Unix timestamp in the format milliseconds since '1970-01-01 00:00:00' UTC, expressed
as a BIGINT.

Example

Example Dataset

The examples following are based on the sample stock dataset that is part of
Getting Started
Exercise in the Amazon Kinesis Analytics Developer
Guide.

Note

The sample dataset has been modified to include a Unix timestamp value (CHANGE_TIME).

To run each example, you need an Amazon Kinesis Analytics application that has the
input stream for the sample stock ticker. To learn how to create an Analytics
application and configure the input stream for the sample stock ticker, see Getting Started Exercise in
the Amazon Kinesis Analytics Developer Guide.