View Single Post
  #2 (permalink)  
Old September 2nd, 2009, 08:02 PM
kokoness kokoness is offline
Authorized User
 
Join Date: Aug 2009
Posts: 31
Thanks: 16
Thanked 1 Time in 1 Post
Default

If I remember it correctly, you could do this:

this.dataGridView1.Columns["MyDate"].DefaultCellStyle.Format = "dd-MMM-yy";

conversion example
Code:
        static void Test1()
        {
            DateTime today = DateTime.Now;

            string formattedDate = today.ToString("dd-MMM-yy");

            Console.WriteLine(formattedDate);
        }
Reply With Quote
The Following User Says Thank You to kokoness For This Useful Post:
skhan (September 3rd, 2009)