Is there a simple way to get around this problem?
Thanks.
Willie
Solution: Select the MaskedTextBox. Expand Databindings in Properties.
Click on the ellipses for “(Advanced)”
A dialog box appears where you can set a custom format. Choose custom and
select MM/dd/yyyy as the custom format.
I do think this is a bug in VS.
Has anyone found a solution to the date display problem of MaskedTextBox
(without databinding) ?
Convert.ToDateTime(DataRow.Item("Date")).ToString("MM/dd/yyyy")
"husainac" <husa...@discussions.microsoft.com> escribió en el mensaje de
noticias news:E3DD2DCF-E1B3-448A...@microsoft.com...
public string formatDateAsMMDDYYYY(DateTime d)
{
string result = "";
result = d.Month.ToString().Trim().PadLeft(2, '0');
result += d.Day.ToString().Trim().PadLeft(2, '0');
result += d.Year.ToString().Trim();
return result;