SOLVED

Complex expression with ago( )

Copper Contributor

I am trying to work with more complex expressions, and scalar function ago() is not behaving as expected. Specifially, this fails,

print ago( 3 * 5min )

throwing sytax error "ago(): argument #1 must be timespan literal"

This works: 

print ago( 15min )

And this works: 

let x = 15min;
print ago( x )

But this fails: 

let x = 3 * 5min;
print ago( x )

Other functions I have tested don't have the same problem. This works: 

print abs( 3 * 5min )

Is there something I should be or could be doing differently to get the desired result?

3 Replies
There was a limitation on ago() and now() with expression. We are working to remove those limitations. Please stay tuned. For now as a workaround you can use something like this: let a=3m; let b=2*a; print now()-b
best response confirmed by Tim Curwick (Copper Contributor)
Solution
This has been fixed now...You should be able to use the expressions with ago() and now()

Ketan,

 

Cool! Thanks for fixing it. Was this fix already in the pipeline or was that a quick response to the issue being raised here?

1 best response

Accepted Solutions
best response confirmed by Tim Curwick (Copper Contributor)
Solution
This has been fixed now...You should be able to use the expressions with ago() and now()

View solution in original post