Skip to main content
Ben Brandt
Seasoned ⭐️⭐️⭐️
Seasoned ⭐️⭐️⭐️
Mar 3, 2022 2:54 PM UTC
Solved

Similar to 365d-ago for historical, how do we specify relative time for future?

For the Retrieve data points API and a few other API’s that allow date range input, we are able to specify a string where, “The format is N[timeunit]-ago where timeunit is w,d,h,m,s.”  This is able to specify a time in the past.  I am now trying to specify end as “-365d-ago” to set a date 365 days in the future, but this is giving an error.

Is there another syntax available for specifying future dates?

N[timeunit]-afterNow?

365d-afterNow?

Lead Product Manager
Mar 10, 2022 1:16 PM UTC

Additionally, we have a feature defined to expand short notation for data point retrieval to support the same notation for the past as well (i.e. negative short notation values). It’s in the Product Management queue for consideration in 2H2022, but we do not have an explicit schedule, nor a committed plan for delivery right now.

4 replies

Practitioner ⭐️⭐️⭐️
Mar 10, 2022 1:10 PM UTC

We do not currently support relative timestamps in the future - the pattern from the doc is the only one we support (though it also accepts `ms` for milliseconds). However, as you might know, these endpoints also accept Unix timestamps in milliseconds - for example, noon UTC on March 10, 2022 would be 1646913600000. So you could compute the timestamp of your desired future time and supply that instead.

Lead Product Manager
Mar 10, 2022 1:16 PM UTC

Additionally, we have a feature defined to expand short notation for data point retrieval to support the same notation for the past as well (i.e. negative short notation values). It’s in the Product Management queue for consideration in 2H2022, but we do not have an explicit schedule, nor a committed plan for delivery right now.

Practitioner ⭐️⭐️⭐️
Mar 10, 2022 2:13 PM UTC

@Ben Brandt You could add the idea that Thomas mentioned above to the Ideation Module to see if it gets upvotes from others as well, which would increase the likelihood of us prioritizing it.

Ben Brandt
Seasoned ⭐️⭐️⭐️
Seasoned ⭐️⭐️⭐️
Mar 10, 2022 3:00 PM UTC

@AasmundEldhuset As requested, I have added the product idea here: