Serial Time Clock DS3231

Does anyone have a very very simple codes for DS3231? I just need to get the date and time from it. I
searched on Google and those examples are so complicated. If possible, can you also attach the library goes along with the codes? Thank you so much.

There are examples that come with the library.

http://bildr.org/2011/03/ds1307-arduino/
Use for 3231 with no change to code. No library either. I would suggest this is as simple as you can get, and the most efficient.

Most examples comes with the library are very old and doesn't work anymore. I hope you guys can help me.

avalnch15:
Most examples comes with the library are very old and doesn’t work anymore. I hope you guys can help me.

What do you mean by “don’t work” ?
Please post a simple example and explain what is not working

Here is an example that does not use a library

//https://datasheets.maximintegrated.com/en/ds/DS3231.pdf

#include <Wire.h>
const byte CLOCK_ADDRESS = 0x68;
const byte clockHours = 0x02;
const byte clockMinutes = 0x01;
const byte clockSeconds = 0x00;
const byte clockDate = 0x04;
const byte clockMonth = 0x05;
const byte clockYear = 0x06;
const byte clockTempMSB = 0x11;
const byte clockTempLSB = 0x12;


void setup()
{
  Serial.begin(115200);
  while (!Serial);
  Wire.begin();
  //  setMinute(59);
  //  setSecond(55);
}

void loop()
{
  static byte previousSecond = 0;
  byte currentSecond = readClock(clockSeconds);
  if ( currentSecond != previousSecond)
  {
    previousSecond = currentSecond;
    Serial.print(bcdToDec(readClock(clockHours)));
    Serial.print(":");
    Serial.print(bcdToDec(readClock(clockMinutes)));
    Serial.print(":");
    Serial.print(bcdToDec(readClock(clockSeconds)));
    Serial.print(" ");
    Serial.print(bcdToDec(readClock(clockDate)));
    Serial.print("/");
    Serial.print(bcdToDec(readClock(clockMonth)));
    Serial.print("/");
    Serial.println(bcdToDec(readClock(clockYear)));
    byte msb = readClock(clockTempMSB);
    byte lsb = readClock(clockTempLSB) & 0b11000000;
    lsb = lsb >> 4;
    Serial.print("MSB : ");
    Serial.println(msb);
    Serial.print("LSB : ");
    Serial.println(lsb);
    float temp3231 = ((((short)msb << 8) | (short)lsb) >> 6) / 4.0;
    Serial.println(temp3231);
    Serial.println();
  }
}

byte readClock(byte clockData)
{
  Wire.beginTransmission(CLOCK_ADDRESS);
  Wire.write(clockData); //start reading here
  Wire.endTransmission();
  Wire.requestFrom(CLOCK_ADDRESS, 1); //get a byte
  return Wire.read();
}

byte decToBcd(byte val)
{
  return ( (val / 10 * 16) + (val % 10) );
}

byte bcdToDec(byte val)
{
  return ( (val / 16 * 10) + (val % 16) );
}