I have a web form and I want to set the default value of tbox.DateEntered.Text = to todays date in mm/dd/yyyy format.
How would I do that in C#?
MM/DD/YYYY C# Format
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Jignesh TrivediRank #16 · 50.3K reputationPosted Feb 5, 2013, 2:53 AM EST
you may use
DateTime.Now.ToString("MM/dd/yyyy")
it will return 02/05/2013 (today's date)
hopr this will help you.
richard smithRank #8,268 · 225 reputationPosted Feb 5, 2013, 3:01 AM EST
tbox.DateEntered.Text = DateTime.Now.ToString("MM/dd/yyyy")
Jignesh TrivediRank #16 · 50.3K reputationPosted Feb 5, 2013, 3:10 AM EST
ZAIN ULARIFEEN118 reputationPosted Feb 5, 2013, 7:51 AM EST