Forum Discussion

GrantK's avatar
GrantK
Qrew Trainee
2 years ago

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

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

1 Reply

  • GrantK's avatar
    GrantK
    Qrew Trainee

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