User839733648 posted
Hi neerajkumarmodi,
According to your description, I suggest that you could use the String.Format("{0:MM/dd/yyyy hh:mm:ss tt}", date) function to format your date.
For more details, you could refer to the code below.
DateTime days = DateTime.Today.AddDays(0);
DateTime nDaysAgo = DateTime.Today.AddDays(-10);
string daysformat = String.Format("{0:MM/dd/yyyy hh:mm:ss tt}", days);
string nDaysAgoformat = String.Format("{0:MM/dd/yyyy hh:mm:ss tt}", nDaysAgo);
Response.Write("days:" + daysformat);
Response.Write("<br/>");
Response.Write("nDaysAgo:" + nDaysAgo);
output:

Best Regards,
Jenifer