I got a qns how can get today date only and time only not together?
How can add today to 5 day later to show user want the item will come?
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.
VulpesPosted Jul 28, 2013, 10:15 AM
DateTime dt = DateTime.Today.AddDays(5);
Label2.Text = dt.ToString("dd/MM/yyyy");
Tan Kai KaiPosted Jul 28, 2013, 9:29 AM
Sanjeeb LenkaPosted Jul 21, 2013, 9:57 AM
string date=DateTime.Now.ToString("dd/MM/yyyy");
Label1.Text = date;//here showing it in a label
for only tme:
string time = DateTime.Now.ToString("HH:mm:ss tt");
Label1.Text = time;//here showing it in a label