Solved

Test features between a range of dates

  • 27 March 2019
  • 3 replies
  • 12 views

Badge

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?

icon

Best answer by nielsgerrits 27 March 2019, 08:18

View original

3 replies

Userlevel 6
Badge +31

What FME version?

Userlevel 6
Badge +31

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

Badge

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.

Reply