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

Feature Idea: NRQL current timestamp

feature-request
nrql
timestamp
rfb

#1

How can I get the current timestamp? Similar to Ruby’s Time.now.

I would like to make a query like “Number unique users created 3 days ago”.
I was expecting something like this to work:

SELECT uniqueCount(user_id) FROM Transaction WHERE user_id is NOT NULL AND dateOf(user_created_date) = (current_timestamp() - 3 days)

It works if I use a plain String like 'December 21, 2015', but I would like this query to be dynamic instead of having to type a new date every time.


New Relic edit

  • I want this, too
  • I have more info to share (reply below)
  • I have a solution for this

0 voters

We take feature ideas seriously and our product managers review every one when plotting their roadmaps. However, there is no guarantee this feature will be implemented. This post ensures the idea is put on the table and discussed though. So please vote and share your extra details with our team.


Using relative weekdayOf/hourOf in NRQL
#2

@mariolinden there is not currently a way to do this. In fact, the only place formula’s work at this time is when used in the SELECT portion of your statement. More details on this can be found in the NRQL Math documentation.

However, this would be an excellent feature, and I have filed this as a feature request on your behalf.


#3

+1 for this feature!


#4

You got it @aaronsnyder! Putting in a feature request for you now!


#5

Any update for this request? if not +1 for this feature


#6

we need this, +1 for this feature


#7

Thanks @lkaravadi and @jorge.alaniz! Please add your vote to the poll above! The more interest we see behind this idea, the better! :thumbsup:


#8

+1 [the other 18 characters]


#9

Hey @lesgateaux—I would love to hear your specific use case for this. Please share below on how seeing this feature will benefit you and your team.


#10

+1 on getting this as well as Hours(Time1 - Time2)
OR Time1.LongTime (i.e. Java like)


#11

Similar to this idea…

as requested @babbott


#12

Thanks for linking these two Feature Ideas together, @bevan! :thumbsup: I hope you were able to vote in both polls if they both articulate what you need.


#13

Any result on this? Would be great to have it and its been over 3 years already…


#14

This is such a basic feature, and one that should be possible to implement with very little overhead and performance drag. InfluxDB has it, I might add.

Can any NR rep speak on this?


#15

Hi @alexander4! I spoke to our Product Manager and team in charge of potentially making this change, and they are not ready to share publicly what our plans are regarding this timestamp implementation. Be sure to keep an eye on this thread and I will try and give updates as I learn about them. Be sure to vote in the poll above! The more votes, the better! :blush: