Skip to Content
DocumentationTransformsInterpret Timestamp

Interpret a Column as a Timestamp

Interprets a column, containing an epoch timestamp, as a datetime type. Epoch timestamps measured in both seconds and milliseconds can be interpreted with this transform.

Example

id

timestamp

151627042956873
161627042956884

id

timestamp

152021-07-23 12:22:36.873
162021-07-23 12:22:36.884

Configuration

The following option(s) are available when configuring this transform.

Parse Type

Timestamp (millis) or Timestamp (seconds) should be selected to interpret a timestamp in either milliseconds or seconds.

Column

Select the epoch timestamp column to interpret as a datetime type.

Where

Add a condition to specify when the transform should be applied.

Screenshot of interpret as timestamp transform configuration

Adding the Transform

  1. Select a column containing an epoch timestamp by clicking on a column header in the table.
  2. Find the Interpret column as timestamp in seconds or Interpret column as timestamp in milliseconds transform under the Type Manipulation group.

Alternatively, you can click on + Add Script Step on the right of the Wrangler to find the Interpret column as timestamp transforms after expanding Type Manipulation group.

Screen recording of adding the transform

Key Considerations

  • The type of the selected columns will be changed to datetime.
  • If a selected column is an invalid date format, the column value is set to INVALID_DATE and the column’s type is set to string. Tn this case, the Where clause can be used to conditionally apply this transform for any special cases.