---
title: "DateTime Shorting in c#"  
description: "DateTime Shorting in c#"  
author: "Manmohan Jha"  
published: 2014-04-18  
updated: 2014-04-23  
canonical: https://www.mindstick.com/forum/2019/datetime-shorting-in-c-sharp  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# DateTime Shorting in c#

How to short list of month in MMMM-yy formate?????

## Replies

### Reply by Manmohan Jha

I'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();

### Reply by Chris Anderson

String.Format("{0:MMMM-yy}",DateTime.Now)


---

Original Source: https://www.mindstick.com/forum/2019/datetime-shorting-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
