Hello:
How do I get the system date and enter it into a textBox?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
kiran kumarPosted Mar 15, 2010, 4:50 AM
textbox.text=DateTime.Now.ToString("d");
mark the answer if it helps you
Mike GoldPosted Mar 16, 2010, 2:14 AM
GustavoPosted Mar 15, 2010, 5:03 AM
Thanks, I tried yyyy/mm/dd and it gave me some strange month, so I changed it to yyyy/MM/dd. (mm->MM).
Thanks again
kiran kumarPosted Mar 15, 2010, 5:02 AM
GustavoPosted Mar 15, 2010, 4:53 AM
YES...thats it. Is there a way to change the format of the date to yyyy/mm/dd?
Amit ChoudharyPosted Mar 15, 2010, 4:45 AM
Textbox.Text=System.DateTime.Now;
mark as answer.