How to add a first date in given Month?

 Posted by vishalneeraj-24503 on 12/1/2014 | Category: Visual Studio Interview questions | Views: 355 | Points: 40
Answer:

Just write below code:-
DateTime dt;

dt = new DateTime(dt.Year, dt.Month, 1);
Response.Write(dt.ToString());

Output would be 1st december.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response