Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

Calculating Seconds with Timestamps Broken?


I’ve read extensively were it was possible to calculate durations in seconds using (max(timestamp)-min(timestamp)/1000/60)

I am using this in NR1 and the result displayed is a Date format. I assume if I change the format using the data formatter, it will be changed for everyone. How do I change the timestamp to a numeric format so I can do math with it?


@philweber is this problem isolate to NR1? I’m curious why the move to NR1 forum and not NRQL? I get the same behavior in Insights.


Sorry, @reopelle.scott, I have used that technique successfully in the past, so I assumed that the problem was specific to New Relic One. But you are correct that Insights also formats the result as a date; apparently the behavior has changed. I have moved your post back to its original topic. Thanks!


Fell on an interesting scenario… The “Date” issue occurs if I format my NRQL like this:

It works if formatted like this:
filter((max(timestamp) - min(timestamp)) / 1000


Your first example is missing a parenthesis. Do you mean:


? Oh, actually they are both missing a paren. :slight_smile: