How to get date in masked textbox as dd/mm/yyyy in C#
I have done like this maskedtextbox1.text=datetime.now.tostring() but it is coming mm/dd/yyyy
Also when there is a single digit date then problem is occuring it is coming like "10/22/010_"
Masked TextBox
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

ArshadRank #2,492 · 564 reputationPosted Nov 1, 2010, 9:57 PM EDT
maskedTextBox1.Text = String.Format("{0:d/M/yyyy}", DateTime.Now);
Regards,
Arshad