Hi everybody,
I'm using a masked textbox for my Date like this : 01/12/2010
Now the problem is, when the user uses a date with a leading 0, the masked textbox gives this 11/22/010_
So it skipped the leading 0 althought it is correct in my database.
This is the code I use to fill the masked textbox :
mtbShipDate.Text = Convert.ToString(dataRowData["ShipDate"]);
Please can somebody help me?
Thanks,
Tania
Masked Texbox Problem
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Shahan AyyubRank #5,163 · 309 reputationPosted Dec 10, 2010, 5:25 AM EST
Can you please use DateTime.TryParse() Method:
like this:
DateTime dt;
Datetime.TryParse(dataRowData["ShipDate"],...........,dt);
then assign it:
mtbShipDate.Text = dt.ToString();
Suthish NairRank #92 · 22.8K reputationPosted Dec 11, 2010, 9:33 AM EST
refer article, might helps