to_timestamp - Administrator Guide - Cortex XDR - Cortex - Security Operations

Cortex XDR Documentation

Product
Cortex XDR
Creation date
2024-03-06
Last date published
2024-11-07
Category
Administrator Guide
Abstract

Learn more about the Cortex Query Language to_timestamp() function that converts an integer to a timestamp.

Syntax
to_timestamp (<integer>, <units>)
Description

The to_timestamp() function converts an integer to a timestamp. This function requires a units value, which indicates whether the integer represents seconds, milliseconds, or microseconds since the Unix epoch. Supported values are:

  • SECONDS

  • MILLIS

  • MICROS

Example
dataset = xdr_data 
| filter story_publish_timestamp != null 
| alter ts = to_timestamp(story_publish_timestamp, "MILLIS") 
| fields ts