How can I set some data if today is the first day of the month, and where can I do this?
The code below gives me the first day of the month, but where should I use this?
DateTime now = DateTime.Now;
DateTime firstDayOfMonth = new DateTime(date.Year, date.Month, 1);
if(now.Day == firstDayOfMonth)
{
SOME CODE;
}
Important that the 'SOME CODE' was made only once a month