Skip to main content
Solved

Test features between a range of dates


Forum|alt.badge.img

I don't understand why this seems to be so hard. I am reading two different google sheets. The first one is input records from the field. The other sheet has the dates of our billing cycles with month, start date, and end date. There is a user parameter to type in month. User a tester I then only add the one month and its start and end dates. I then test the field records to read only those records that fall within the billing date. Originally I had this working when the dates were entered as parameters, but I am looking to automate the entire process and the user does not always know what the dates are for the billing cycle - therefore I want to eliminate the typed in dates and use the read dates from the spreadsheet. The user only has to type in the month.

I have a DateTime Converter right after both readers making their output in FME DateTime format. Then the tester using <= and <. None of the records are passing the test although they should. I checked the format, they have the same significant figures and are both strings. How can I filter based on the dates?

Best answer by nielsgerrits

If I read your screenshot correctly, I think you forget a step in your workflow? I think you need to merge the two streams before "Tester_Daterange", using a FeatureMerger, before you can test? You need the data in one and the same row to test.

Testing separate and merged rows:

Seperate rows will test Failed as a or b is missing.

Merged rows will test correctly.

tester2018.fmwt

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

3 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

What FME version?


nielsgerrits
VIP
Forum|alt.badge.img+54
  • Best Answer
  • March 27, 2019

If I read your screenshot correctly, I think you forget a step in your workflow? I think you need to merge the two streams before "Tester_Daterange", using a FeatureMerger, before you can test? You need the data in one and the same row to test.

Testing separate and merged rows:

Seperate rows will test Failed as a or b is missing.

Merged rows will test correctly.

tester2018.fmwt


Forum|alt.badge.img
  • Author
  • March 27, 2019

Thanks for the great explanation of the tester. It helped me understand that the user parameter was added to the incoming feature so the test was within the feature. I decided to go with the inline querier since I wanted to join all three attributes to the incoming primary table. It now works and looks a little cleaner. When I have time some cleanup can probably be done by assigning the datetime and other numeric values to the various attribute. Thanks again for your explanation.


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