Simples question from noobie

I am trying to make a simple clock. I have a RTC which I can read the time and date from and want to make messages appear based on the date.

As a noobie, I just cant get this simple bit to work. I have the month and day as an integer and want to use them to make different messages appear. I cut the programme down to the code below, trying to make the banner show the right thing but it doesnt work!

I set the day as 24 and month as 7 manually as below. When I run it, it shows the 'banner' as 'not 24 July' but it should show '24 July'. Can someone help and explain why?!!

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
  int intmonth = 7;
  int intday = 24;
  String banner = "";

  if (intmonth=7){
    if (intday = 24){banner = "24 July";}
  }

  if (intmonth = 6){
    if (intday=24){banner = "not 24 July";}
  }

  Serial.print(banner);
  Serial.println();
  delay(1000);
}

= is assignment. For comparison you need == i.e (intmonth == 7)

Steve

Thanks, should have guessed that one. Found this which helped too!

I found this C Tutorial very helpful when I was learning C.

++Karma; // For posting your code correctly on your first post.