Skip to main content
Question

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

  • Mar 20, 2023 10:48 PM UTC
  • 0 replies
  • 368 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
  • Qrew Cadet
  • Mar 22, 2023 1:01 AM UTC

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
------------------------------