const int = time

const int OnMin1 = 46;
const int OnHour1 = 17;
const int OnDay1 = 16;
const int OnMonth1 = 12;
const int OnYear1 = 2017;

I am using this to call time in my sketch to turn relay on and off. Can you use && or something else to call more than one hour in the const int OnHour1 = 17;18,19,20 or 17&& 18&& 19&&. Can you do this? or how can you do this? Thanks again for the help

Do you mean something like:

if(OnHour1 == 17 || OnHour1 == 18 || OnHour1 == 19)

Returns true if OnHour1 is 17 or 18 or 19.

if(OnHour1  >= 17 && OnHour1 <= 19)

Works too.

Is there some way to add it as an (int)

const int OnMin1 = 46;
const int OnHour1 = 17;
const int OnDay1 = 16;
const int OnMonth1 = 12;
const int OnYear1 = 2017;
const int OffMin1 = 47;
const int OffHour1 = 17;
const int OffDay1 = 16;
const int OffMonth1 = 12;
const int OffYear1 = 2017
if ((now.hour() == OnHour1) && (now.minute() == OnMin1) && (now.day() == OnDay1) && (now.month() == OnMonth1)) {
    digitalWrite (relay1, LOW);
    lcd.setCursor(1, 2);
    lcd.print("ON");

  }
  else if ((now.hour() == OffHour1) && (now.minute() == OffMin1) && (now.day() == OffDay1) && (now.month() == OffMonth1)) {
    digitalWrite (relay1, HIGH);
    lcd.setCursor(1, 2);
    lcd.print("OFF");

I don't understand :confused: , tell me exactly what you want to do.

outsider:
I don't understand :confused: , tell me exactly what you want to do.

const int OnHour1 = 17; The relay comes on in the 17th hour of a 34 hour day. What I want to do is have it read
const int OnHour1 = 17,18,19,20; So the relay comes on at the 17th hour and the 18th hour and the 19th hour and so on. All my triggers are in the const int

const int OnHour1[]= {17,18,19,20};

larryd:
const int OnHour1[]= {17,18,19,20};

Yes, perhaps you're thinking of an array?

How about something like:

if(now.hour() == OnHour1 || now.hour() == OnHour1 + 1 || now.hour() == OnHour1 + 2)

Returns true if OnHour1 is 17 or 18 or 19.

if(now.hour() >= OnHour1  && now.hour() <= OnHour1 + 2)

Works too. But there are better ways to do it.

gfvalvo:
Yes, perhaps you're thinking of an array?

Yes yes that what I am thinking I will try that. Thank You

sprinkfitter:
Yes yes that what I am thinking I will try that. Thank You

That works thanks

@gfvalvo:
I was thinking the same, but too late at night for me to try foolish things, like thinking. :confused: