Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you convert the field type in CloudWatch?

The @timestamp field for example, while a long, is always displayed as a date. Can I convert/display it as a long/int?

like image 538
kane Avatar asked Oct 23 '25 07:10

kane


1 Answers

There is a toMillis function:

Converts the timestamp found in the named field into a number representing the milliseconds since the Unix epoch.

https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html

like image 193
Dejan Peretin Avatar answered Oct 26 '25 14:10

Dejan Peretin