Solved

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


Badge +7

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.

icon

Best answer by ebygomm 25 July 2022, 10:46

View original

4 replies

Userlevel 1
Badge +21

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

Badge +7

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?

Userlevel 1
Badge +21

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

Badge +7

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!

Reply