AnsweredAssumed Answered

sorting on a date fied

Question asked by priyankas9531 on Jul 13, 2015
Latest reply on Sep 11, 2015 by Adam Arrowsmith

I have a requirement to sort on a date field so that i can calculate the 5 weeks Rolling Average on the Sales number against those dates. I am searching for many examples but found all on List which is working fine if i define a list in the sript but gives me error when i am trying to pass a field into it.
Can anyone help?

This gives me error
//assigning a temp variable to the date field DAD
d1 = DAD;
def List = d1;
myList = List.each{ println it };

This works fine
def List = ["2015-06-05T09:18:20.000Z","2015-06-04T09:19:31.000Z","2015-06-01T09:18:20.000Z"];
myList = List.each{ println it };