Insert switch to lcd clock

You may not have the right DS3231 library installed. There are more than one and they are probably not compatible.

Read the forum guidelines to see how to post code.
Use the IDE autoformat tool (ctrl-t or Tools, Auto Format) to indent the code for readability before posting code.

Post the entire text of the error message. It is easy to do. In the IDE on the lower right there is a "copy error" button. Copy and paste the error into a post in code tags. Paraphrasing the error leaves out important information.