Get the max integer of an array

Hello,

I'm looking for a way to get the max element of an array containing integer. I can't find any way to do that.

Here is how I created my array in a ruby filter :

DateTab=[event.get('dateTransfertConseiller').to_i,event.get('dateConsultation').to_i,event.get('dateSante').to_i,event.get('dateauto').to_i,event.get('datehoraires').to_i])

I want to get the element in the array DateTab that is the bigger. For example if DateTab = 1,5,89,51,264,120

The result shoud be 264

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.