Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MM/dd/yyyy format

Tags:

c#

datetime

I have the following:

PMRCutoffDate.Value = ReportCalc.Cutoff_Date.ToString("MM/dd/yyyy");
PMRDate.Value = DateTime.Now.ToString("MM/dd/yyyy");

i want dates to show up as: 03/05/2010, not 3/5/2010 or 03/5/2010 or 3/05/2010

However, my program STILL shows the date incorrectly (3/10/2010).

Any ideas on what's wrong?

like image 603
yeahumok Avatar asked Mar 10 '10 16:03

yeahumok


1 Answers

In VS 2008 I have the following code with the output you are looking for. Can you post more information? Code:

Console.WriteLine(DateTime.Now.ToString("MM/dd/yyyy"));

Output:

03/10/2010
like image 169
QueueHammer Avatar answered Oct 20 '22 17:10

QueueHammer