Check to see if the given Date is the first of the month.

vishalneeraj-24503
Posted by vishalneeraj-24503 under ASP.NET category on | Points: 40 | Views : 317
DateTime dt = DateTime.Now;
DateTime dt1;

if (dt.Day == 1)
{
Response.Write("First Date");
}
else
{
dt1 = new DateTime(dt.Year, dt.Month, 1);
Response.Write(dt1.ToString());1st november
}

Comments or Responses

Login to post response