Skip to main content
Question

Statistic calculator working with dates

  • November 27, 2012
  • 4 replies
  • 68 views

jpvo
Contributor
Forum|alt.badge.img+2
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
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

sigtill
Supporter
Forum|alt.badge.img+25
  • Supporter
  • November 27, 2012
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.

 

 

 

 


fmelizard
Safer
Forum|alt.badge.img+21
  • Safer
  • November 27, 2012
Hi JP,

 

 

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

 

Itay

fmelizard
Safer
Forum|alt.badge.img+21
  • Safer
  • November 27, 2012
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.

jpvo
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • November 27, 2012
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!