Skip to main content
Hi guys,

 

I'm interested in having a statisatic calculator that would work with dates. I'd like to return the most recent date of an object set "group by" tile_ID.

 

Is there a way I could do this without a python caller?

 

 

Cheers,

 

 

JP
Not sure if this is what you are after, but it might help anyway :)

 

 

I assume you have a DATE-attribute = 2012-12-10

 

 

Then you can use an attributesplitter on - and get a list, and rename these to something else

 

 

dates(0) = 2012, rename to year

 

dates(1) = 12, rename to month

 

dates(2) = 10, rename to day

 

 

Then you can use an Aggreagator on Tile_ID and a sorter to sort on Year, Date, Day for each Tile_ID.

 

 

 

 


Hi JP,

 

 

It would help if you can specify your date attribute format and type.

 

Itay
If you are using oracle a simple StatisticsCalculator will return the max of the date attribute and you can group it by a tile ID.
Hi,

 

 

I think I got the answer from you both. I use a date formatter to make sure I got FME Date (%Y%m%d) and then I can use the statistique calculator with "group by" tile_ID.

 

 

I tried earlier but with non conventional date format and got an error message from the StatCalculator.

 

 

Thanks!

Reply