Given Date To Change the Date Formate

Sabarimahesh
Posted by Sabarimahesh under C# category on | Points: 40 | Views : 1895
DateTime start = Convert.ToDateTime(textBox3.Text.ToString());    


------------------------------------------------------------------------------------------------------------------------------------------------
Formate:08-12-2011
------------------------------------------------------------------------------------------------------------------------------------------------
            textBox1.Text = start.ToString("d");



------------------------------------------------------------------------------------------------------------------------------------------------
Formate:08 December 2011
------------------------------------------------------------------------------------------------------------------------------------------------
            textBox1.Text = start.ToString("D");


------------------------------------------------------------------------------------------------------------------------------------------------
Formate:08 December 2011
------------------------------------------------------------------------------------------------------------------------------------------------
            textBox1.Text = start.ToString("f");


------------------------------------------------------------------------------------------------------------------------------------------------
Formate:08 December 2011
------------------------------------------------------------------------------------------------------------------------------------------------
            textBox1.Text = start.ToString("F");


------------------------------------------------------------------------------------------------------------------------------------------------
Formate:08-12-2011 00:00:00
------------------------------------------------------------------------------------------------------------------------------------------------
            textBox1.Text = start.ToString("g");


------------------------------------------------------------------------------------------------------------------------------------------------
Formate:08-12-2011 00:00:00
------------------------------------------------------------------------------------------------------------------------------------------------
            textBox1.Text = start.ToString("G");


------------------------------------------------------------------------------------------------------------------------------------------------
Formate:December 08
------------------------------------------------------------------------------------------------------------------------------------------------
            textBox1.Text = start.ToString("m");


------------------------------------------------------------------------------------------------------------------------------------------------
Formate:December 08
------------------------------------------------------------------------------------------------------------------------------------------------
            textBox1.Text = start.ToString("M");


------------------------------------------------------------------------------------------------------------------------------------------------
Formate:2011-12-08T00:00:00.0000000
------------------------------------------------------------------------------------------------------------------------------------------------
            textBox1.Text = start.ToString("o");


------------------------------------------------------------------------------------------------------------------------------------------------
Formate:2011-12-08T00:00:00.0000000
------------------------------------------------------------------------------------------------------------------------------------------------
            textBox1.Text = start.ToString("O");


------------------------------------------------------------------------------------------------------------------------------------------------
Formate:2011-12-08T00:00:00
------------------------------------------------------------------------------------------------------------------------------------------------
            textBox1.Text = start.ToString("s");


------------------------------------------------------------------------------------------------------------------------------------------------
Formate:00:00:00
------------------------------------------------------------------------------------------------------------------------------------------------
            textBox1.Text = start.ToString("t");


------------------------------------------------------------------------------------------------------------------------------------------------
Formate:00:00:00
------------------------------------------------------------------------------------------------------------------------------------------------
            textBox1.Text = start.ToString("T");


------------------------------------------------------------------------------------------------------------------------------------------------
Formate:2011-12-08 00:00:00Z
------------------------------------------------------------------------------------------------------------------------------------------------
            textBox1.Text = start.ToString("u");


------------------------------------------------------------------------------------------------------------------------------------------------
Formate:07 December 2011
------------------------------------------------------------------------------------------------------------------------------------------------
            textBox1.Text = start.ToString("U");


------------------------------------------------------------------------------------------------------------------------------------------------
Formate:December, 2011
------------------------------------------------------------------------------------------------------------------------------------------------
            textBox1.Text = start.ToString("y");


------------------------------------------------------------------------------------------------------------------------------------------------
Formate:December, 2011
------------------------------------------------------------------------------------------------------------------------------------------------
            textBox1.Text = start.ToString("Y");

Comments or Responses

Login to post response