RTC DS3231 set+alarm

Hello everybody,
I'm trying to merge two scketches to operte with a RD2331 (rtc_3231 + rtc_3231_alarm), I´m using an "If" expression to connect both loops, but at the momet of compiling appears some errors like "expected primary-expression before '|' token" and many other.
Is there another way to set the initial time and after that upload the definitive scketch or is it necessary to include the time set scketch in the main scketch?
Thanks. I'll appreciate any help

nicorodri:
Thanks. I'll appreciate any help

SMDH! If only you would show us the code, we could show you the source of your error. It's really hard to debug code we can't see.

nicorodri:
Is there another way to set the initial time and after that upload the definitive sketch?

Yes. If your RTC chip has the necessary battery attached it will remember and keep the time even when the Arduino is powered off. Use one sketch to set the date and time. Then you can use a different sketch to read and use the date and time.