DateTime Shorting in c# Manmohan Jha353618-Apr-2014 How to short list of month in MMMM-yy formate????? c#c# Updated on 23-Apr-2014
Manmohan Jha
23-Apr-2014I've Solved this myself ...
string str="Jan-14,Apr-13,Feb-14,May-13,Mar-14,Nov-13,Oct-13,Jun-13,Sep-13,Aug-13,Dec-13,Jul-13";
In String >>>>
string sortedlist = string.Join(",", str.Split(',').OrderBy(s => DateTime.ParseExact(s, "MMM-yy", CultureInfo.CurrentCulture)).ToArray());
In ListBox >>>>
listBox1.DataSource = str.Split(',').OrderBy(s => DateTime.ParseExact(s, "MMM-yy", CultureInfo.CurrentCulture)).ToArray();
Chris Anderson
18-Apr-2014