Reputation: 33764
How to get current Date from Windows and put into my textbox
Upvotes: 2
Views: 6427
Reputation: 96497
For just the date use:
someTextBox.Text = DateTime.Now.ToShortDateString();
For date and time use:
someTextBox.Text = DateTime.Now.ToString();
You might also want to look at the custom and standard formats available to you.
Upvotes: 4