Skip to main content
Question

Statistic calculator working with dates

  • November 27, 2012
  • 4 replies
  • 47 views

jpvo
Participant
Forum|alt.badge.img+1
  • Participant
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

4 replies

sigtill
Supporter
Forum|alt.badge.img+24
  • 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+18
  • 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+18
  • 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
Participant
Forum|alt.badge.img+1
  • Author
  • Participant
  • 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!

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