From: Chandu Chandu [mailto:chandu_750 / yahoo.com] # i wanted to sort dates in ascending order i.e # ['06/06/2004','10/06/2005','12/09/2007'] # could any one explain me whether there is built in class or need to # break tha date string # yyyy mm dd and compare .. you have the idea. just continue reading more on ruby.. eg, > date = ['12/09/2007','06/06/2004','10/06/2005'] => ["12/09/2007", "06/06/2004", "10/06/2005"] > date.sort_by{|d| m,d,y=d.split("/");[y,m,d]} => ["06/06/2004", "10/06/2005", "12/09/2007"]