Skip to main content
Solved

Is there a straightforward way to filter date/time attribute by a set period?

  • October 27, 2020
  • 3 replies
  • 687 views

I have a 10-year-long dataset that needs to be split by year. The complication in my case is that I need each output year to start from December of the preceding year, i.e. the output filter for year 2019 has to be from 01/12/2018 00:00 to 01/01/2020 00:00. I can't seem to get this to work with AttributeRangeFilter.

Cheers.

Best answer by ebygomm

I presume you've converted your dates to FME formats and are using that syntax in the AttributeRangeFilter?

 

Personally, I'd probably add a month to each date and then get the year and then filter by that single value.

 

 

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

3 replies

ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • Best Answer
  • October 27, 2020

I presume you've converted your dates to FME formats and are using that syntax in the AttributeRangeFilter?

 

Personally, I'd probably add a month to each date and then get the year and then filter by that single value.

 

 


david_r
Evangelist
  • October 27, 2020
ebygomm wrote:

I presume you've converted your dates to FME formats and are using that syntax in the AttributeRangeFilter?

 

Personally, I'd probably add a month to each date and then get the year and then filter by that single value.

 

 

I was just going to suggest the same thing. Keep it simple.


That's it! I have converted the original date/time from mm/dd/yy to dd/mm/yyyy, but have not used the FME format.

Everything works like a charm now, thank you muchly!


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