How to check if the Date is the first of every month?

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

We have Datetime'Day in-built property and is a numeric value,we have to check like below:-
DateTime dt = DateTime.Now;

if (dt.Day == 1)
Response.Write("First Date");
Response.Write("Not a First Date");

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response