How to format date in MMDDYYY format?

  • Thread starter Thread starter Florida . NET Coder
  • Start date Start date
F

Florida . NET Coder

I am trying to format the system date in the MMDDYYYY format and am having
troubles. Does anyone have a code sample for me? Thank you.
 
String dateString=DateTime.Now.ToString("MM/dd/yyyy");
Console.WriteLine(dateString);

note that the 'MM' portion is in CAPS.

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top