DS3231 Module programming problem

In my code i have this string rtc.getDateStr() which displays the date in the serial monitor, i want to use it in a if condition so i could action a module in certain days like for today rtc.getDateStr() prints 19.03.2018 in the serial monitor but when i put it in a if condition like if(rtc.getDateStr()=="19.03.2018") it doesn't work

In my code

...which I didn't post,

Sorry

#include <DS3231.h>
#include <Time.h>
#include <TimeLib.h>
#define RELAY1 7
Time currentTime;
int m, h, s, oldMinute,days;
// Init the DS3231 using the hardware interface
DS3231 rtc(SDA, SCL);

// Code from the Demo Example of the DS3231 Library
void setup()
{
// Setup Serial connection
Serial.begin(115200);
pinMode(RELAY1, OUTPUT);
digitalWrite(RELAY1,1);
// Uncomment the next line if you are using an Arduino Leonardo
//while (!Serial) {}

// Initialize the rtc object
rtc.begin();

// The following lines can be uncommented to set the date and time
//rtc.setDOW(TUESDAY); // Set Day-of-Week to SUNDAY
//rtc.setTime(10, 36, 10); // Set the time to 12:00:00 (24hr format)
//rtc.setDate(30, 1, 2018); // Set the date to January 1st, 2014
}
void loop()
{
// Send Day-of-Week
Serial.print(rtc.getDOWStr());
Serial.print(" ");

// Send date
Serial.print(rtc.getDateStr());
Serial.print(" -- ");
// Send time
Serial.println(rtc.getTimeStr());
// hour,min,sec time-data
// date,mon,year date-data
//dow day-of-week from 1 to 7
currentTime = rtc.getTime();
m = currentTime.min;
h = currentTime.hour;
s = currentTime.sec;
days=currentTime.dow;
if(rtc.getDateStr()=="19.03.2018" or rtc.getDateStr()=="21.03.2018" or rtc.getDateStr()=="22.03.2018")
anormal();
else
normal();
delay(500);
}
void normal()
{
if(days==1 or days==2 or days==3 or days==4 or days==5)
{
if(h==7 and m==50 and s==0)
ring();
if(h==8 and m==0 and s==0)
ring();
if(h==8 and m==50 and s==0)
ring();
if(h==9 and m==0 and s==0)
ring();
if(h==9 and m==50 and s==0)
ring();
if(h==10 and m==0 and s==0)
ring();
if(h==10 and m==50 and s==0)
ring();
if(h==11 and m==10 and s==0)
ring();
if(h==12 and m==0 and s==0)
ring();
if(h==12 and m==10 and s==0)
ring();
if(h==13 and m==0 and s==0)
ring();
if(h==13 and m==10 and s==0)
ring();
if(h==14 and m==0 and s==0)
ring();
if(h==14 and m==10 and s==0)
ring();
if(h==15 and m==0 and s==0)
ring();
}
}
void anormal()
{
if(h==13 and m==0 and s==0)
ring();
if(h==13 and m==45 and s==0)
ring();
if(h==13 and m==50 and s==0)
ring();
if(h==14 and m==35 and s==0)
ring();
if(h==14 and m==40 and s==0)
ring();
if(h==15 and m==25 and s==0)
ring();
if(h==15 and m==30 and s==0)
ring();
if(h==16 and m==15 and s==0)
ring();
if(h==16 and m==20 and s==0)
ring();
if(h==17 and m==5 and s==0)
ring();
if(h==17 and m==10 and s==0)
ring();
if(h==18 and m==55 and s==0)
ring();
}
void ring()
{
digitalWrite(RELAY1,0);
delay(2000);

digitalWrite(RELAY1,1);
delay(1000);
digitalWrite(RELAY1,0);
delay(2000);

digitalWrite(RELAY1,1);
delay(1000);
digitalWrite(RELAY1,0);
delay(2000);

digitalWrite(RELAY1,1);
delay(1000);
}

That why there is a strcmp() function.

I tried the strcmp() function, doesn't work, any other suggestions?

ciuz99best:
I tried the strcmp() function, doesn't work, any other suggestions?

Please be assured that strcmp works, otherwise there would be millions upon millions of very, very unhappy people.