For the complete documentation index, see llms.txt. This page is also available as Markdown.
Cortex XDR 3.x

to_timestamp

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 

Last updated

Was this helpful?