Skip to main content
Solved

Can I use TestFilter to find rows over one week old?

  • July 25, 2022
  • 4 replies
  • 46 views

benvk
Contributor
Forum|alt.badge.img+8
  • Contributor
  • 60 replies

I currently use this WHERE on my reader:

[Last_Updated] < DATEADD(week,-1,GETDATE()) or [Last_Updated] IS Null

I now have a need to use the items that are older than 1 week, then another need to process those items that are less than a week old.

 

I have added a TestFilter, the NULL test is easy, it is the 1 week item that brings me unstuck. Is this possible to do? 

image 

Or do I need to add another step in my chain of processes?

 

Thanks heaps.

Best answer by ebygomm

Yes, you can do something like this in a tester, test whether the last updated is less than 7 days from today's date

image

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3422 replies
  • Best Answer
  • July 25, 2022

Yes, you can do something like this in a tester, test whether the last updated is less than 7 days from today's date

image


benvk
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • 60 replies
  • July 25, 2022

Yes, you can do something like this in a tester, test whether the last updated is less than 7 days from today's date

image

thats awesome, ill try that now.... I see the -P7D, thats something I havent seen before. What does the P respresent?


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3422 replies
  • July 25, 2022

thats awesome, ill try that now.... I see the -P7D, thats something I havent seen before. What does the P respresent?

P is a delimiter character denoting period

https://docs.safe.com/fme/2021.2/html/FME_Desktop_Documentation/FME_Workbench/!Transformer_Parameters/standard_fme_date_time_format.htm#ISO-8601-Duration-Format


benvk
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • 60 replies
  • July 25, 2022

thats awesome, ill try that now.... I see the -P7D, thats something I havent seen before. What does the P respresent?

Thank you, its working perfectly!