Skip to main content
Solved

Working with Dates - Statistics in and Max

  • September 20, 2016
  • 9 replies
  • 78 views

danilo_fme
Evangelist
Forum|alt.badge.img+45

Hello all,

I have a Excel file with dates and i would like to read this XLS and take the Min and Max values dates.

I didnt find a transformer that make this.

Thanks in Advance,

Best answer by itay

Hi @danilo_inovacao I think it has to do with the fact that you are grouping via the statisticscalculator, and possibly missing out on the " symbol in the date formatter had something to do with it too, but not sure...have a look at my take of it (with a little help from @takashi 's transformer)3

Hope this helps

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

9 replies

itay
Supporter
Forum|alt.badge.img+17
  • Supporter
  • September 20, 2016

Hi @danilo_inovacao, you can use the attribute manager to copy the date into a new attribute, format it using de s setting and sorting + sampling twice once for the min and secondly for the max.

Hope this helps


david_r
Celebrity
  • September 21, 2016

To add to Itay's answer, use a DateFormatter to format the dates as YYYYMMDD and either use the Sorter/Sampler pattern or use the StatisticsCalculator to get the min/max values.


danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Author
  • Evangelist
  • September 21, 2016

Thanks @itay and @david_r by suggestions of transformers.

I have a register that is not works perfect:

Attached my template.

Thanks in Advance,

-workspace-datas-v02.fmwt


itay
Supporter
Forum|alt.badge.img+17
  • Supporter
  • Best Answer
  • September 21, 2016

Hi @danilo_inovacao I think it has to do with the fact that you are grouping via the statisticscalculator, and possibly missing out on the " symbol in the date formatter had something to do with it too, but not sure...have a look at my take of it (with a little help from @takashi 's transformer)3

Hope this helps


danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Author
  • Evangelist
  • September 21, 2016
itay wrote:

Hi @danilo_inovacao I think it has to do with the fact that you are grouping via the statisticscalculator, and possibly missing out on the " symbol in the date formatter had something to do with it too, but not sure...have a look at my take of it (with a little help from @takashi 's transformer)3

Hope this helps

 

Thanks...Its Works :)

 

@itay and @takashi Very thanksssss

takashi
Evangelist
  • September 22, 2016
danilo_fme wrote:

 

Thanks...Its Works :)

 

@itay and @takashi Very thanksssss
Hi @danilo_inovacao, good to hear. However, the reason why the min and max were reversed is still a mystery. Double quotations within a date format specifier are optional, and I don't think the missing double quotations may cause such a strange result.

 

Unfortunately I was not able to run the workspace (V02) you posted. If you posted a workspace that reproduces exactly the same result as the screenshot, we could investigate the reason.

 

In addition, the InlineQuerier might also be useful in this case: -workspace-datas-v04.fmwt

 

There is more than one way ;)

danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Author
  • Evangelist
  • September 22, 2016
takashi wrote:
Hi @danilo_inovacao, good to hear. However, the reason why the min and max were reversed is still a mystery. Double quotations within a date format specifier are optional, and I don't think the missing double quotations may cause such a strange result.

 

Unfortunately I was not able to run the workspace (V02) you posted. If you posted a workspace that reproduces exactly the same result as the screenshot, we could investigate the reason.

 

In addition, the InlineQuerier might also be useful in this case: -workspace-datas-v04.fmwt

 

There is more than one way ;)

 

@takashi perfect this transformer InlineQuerier. thanks :) The results was so amazing too.

itay
Supporter
Forum|alt.badge.img+17
  • Supporter
  • September 22, 2016
takashi wrote:
Hi @danilo_inovacao, good to hear. However, the reason why the min and max were reversed is still a mystery. Double quotations within a date format specifier are optional, and I don't think the missing double quotations may cause such a strange result.

 

Unfortunately I was not able to run the workspace (V02) you posted. If you posted a workspace that reproduces exactly the same result as the screenshot, we could investigate the reason.

 

In addition, the InlineQuerier might also be useful in this case: -workspace-datas-v04.fmwt

 

There is more than one way ;)
very neat @takashi

 


danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Author
  • Evangelist
  • September 22, 2016
danilo_fme wrote:

 

@takashi perfect this transformer InlineQuerier. thanks :) The results was so amazing too.
Thanks Team: @itay @david_r @takashi :)

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