The above replies should help you out already but if not and you are still having problems you could create the following extension method for DateTime and just force it to the format you need regardless of culture setup:
public static class StringExtension
{
static public string ToStringFormatted(this DateTime dt)
{
return string.Format("{0:00}/{1:00}/{2:0000}", dt.Month, dt.Day, dt.Year);
}
// if the culture info change does fix your issue do:
static public string ToStringFormatted2(this DateTime dt)
{
return dt.ToString("MM/dd/yyyy");
}
}
// useage:
string date = DateTime.Now.ToStringFormatted();
// output: 03/10/2010
I prefer extension methods for formatting things like dates as well because someone always has the bright idea of wanting to change the format at some point and I only have to change the extension and my entire app now reflects the new format.