Hi,
I have get only date from datetime string means, the code is shown below.
string date= Convert.ToDateTime(dt.Rows[i]["next_pay_date"]).AddDays(-7).ToString();
The date field get "3/7/2015 12:00:00 AM"
But i have get only date means "3/7/2015"
Please help me..
Thanks in advance
Get only date in datetime string.
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Mar 3, 2015, 12:22 AM EST
string date= Convert.ToDateTime(dt.Rows[i]["next_pay_date"]).AddDays(-7).ToString("M/d/yyyy");
Hema Latha41 reputationPosted Mar 3, 2015, 12:24 AM EST