Question

I want to filter a date attribute field. I only want the features with the current date to return. What would be the way to go?



3 replies

Badge

I would use AttributeCreator using the Text Editor function in the properties of that transformer. There is an option called DateTime Functions and then DateTimeNow. Use a DateFormatter transformer to format to the desired date type and then a Tester to see if your date matches the new attribute.

Maybe quicker ways but that is how I would do it

Userlevel 2
Badge +16

I would use the Tester if you have FME 2017. You can use the Arithmetic Editor to do a formula like:

Current_day - Date_attribute in days < 1 (not always today, but less than a day old).

or Current_day (formatted as "YYYYMMDD") = Today() (formatted as "YYYYMMDD")

Thanks for the answers. I'll give it a shot!

Reply