Skip to main content
Question

Pipeline - Advanced Query to search for records in the last week

  • March 20, 2023
  • 0 replies
  • 347 views

Forum|alt.badge.img+5

Hi All,

Just needed some help refining my advanced query to only search for records where a table's date field is from the last week. 

I have a table which has a "Completed Date"  Date field (FID=117). I have a Pipeline where I want to create a report for all matching records completed during the last 7 days. I have the below query where the syntax doesn't appear to be quite right. If I just use {'117'.GTE.('today'} if will pull records successfully matching today's date.

{'117'.GTE.('today' -time.delta(days=6))}

Can someone help correct my syntax to search records from the previous 7 days?

Thanks.



------------------------------
Grant K
------------------------------
This topic has been closed for replies.

Forum|alt.badge.img+5
  • Author
  • Registered
  • March 22, 2023

The answer seems to be easier to solve by changing to a standard query and comparing to:

{{time.now - time.delta(days=7)}}

I'm assuming time.delta can't be used in an advanced query?. Also tried OAF instead of GTE.



------------------------------
Grant K
------------------------------