// Initialize the rtc object
rtc.begin();
rtc.setDOW(SUNDAY); // Set Day-of-Week to SUNDAY
rtc.setTime(12, 0, 0); // Set the time to 12:00:00 (24hr format)
rtc.setDate(1, 1, 2024); // Set the date to January 1st, 2014
}
While you are waiting... you should re-format and put your code into a "code block"... to do this, (1) edit your post (2) select and CUT your code out (3) reformat your code in your IDE (CTRL-T) and select/cut your code from your IDE (4) inside your message, click the <CODE> button (5) where you see ```type or paste code here``` select the words (type or paste code here) and PASTE your formatted code. You should have something that looks like this:
You might want to look at this How to get the best out of this forum before you proceed any further.
We only know what you tell us, and without knowing what you have, we don't stand a chance.
You are not even telling us what sort of Arduino you have! Which is the very first thing we need to know before we can try and compile it our selves.