Hi,

I need to fill a toolstripcombobox with dates. The values in the toolstripcombobox need to be sorted by date.
The database field that I am pulling to fill this toolstripcombobox has the following fixed format: 201201, 201211.
So, I first need to convert the retrieved values from YYYYMM to MMM-YYYY. Like this 201201 to Jan-2012.
After converting each retrieved value I can add to the toolstripcombobox. However, when finished the combobox must be sorted by the converted date. ToolStripCombobox.Sort is not working as its sorting alpha and not by date.

Any ideas are welcomed.

Are you retriving the data to combox from a table?

If yes, in saving part you must choose the format that you want so that if you fetch it you don't need to do any conversion.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.