Skip to main content
Solved

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


benvk
Contributor
Forum|alt.badge.img+7
  • Contributor

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

View original
Did this help you find an answer to your question?

4 replies

ebygomm
Influencer
Forum|alt.badge.img+31
  • Influencer
  • 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+7
  • Author
  • Contributor
  • July 25, 2022
ebygomm wrote:

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+31
  • Influencer
  • July 25, 2022
benvk wrote:

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+7
  • Author
  • Contributor
  • July 25, 2022
benvk wrote:

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!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings