Skip to main content
Solved

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


Ben Brandt
MVP

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?

Best answer by Thomas Sjølshagen

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.

View original
Did this topic help you find an answer to your question?

4 replies

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.


Forum|alt.badge.img

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.


@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
MVP
  • Author
  • MVP
  • 49 replies
  • March 10, 2022

Reply


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings