code_junkie

How to Convert date into MM/DD/YY format in C#

Nov 13th, 2011
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. textbox1.text = System.DateTime.Today.ToShortDateString();
  2.  
  3. DateTime.Today.ToString("MM/dd/yy")
  4.  
  5. textbox1.text = System.DateTime.Today.ToString("MM/dd/yy");
  6.  
  7. IFormatProvider yyyymmddFormat = new System.Globalization.CultureInfo(String.Empty, false);
  8. return date.ToString("MM/dd/yy", yyyymmddFormat);
Add Comment
Please, Sign In to add comment