yeahumok yeahumok - 3 months ago 29
C# Question

MM/dd/yyyy format

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?

Answer Source

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