DS3231 Time and Date to string array to SD

I am new to coding. I have been pieceing together my project trying different snippets of code, and have been surprsingly successful, but have now hit a snag. I have arduino uno + ds3231 rtc + seeed studio sd shield. Everything works in my code (reads sensor, prints string to csv file nicely), But I can't seem to understand how to say "get the time" or "get the date", and put the getDate or whatever into the string in void loop().

displayTime(); // display the real-time clock data on the Serial Monitor,
delay(1000); // every second

//int RTC = A4;
//int time = analogRead(RTC);

int analogPin = A0;
int sensor = analogRead(analogPin);

// make a string for assembling the data to log:
String dataString = String(id) + (",") + (",") + String(sensor); // print two blank cells before the sensor reading,
// to line up with header categories

// open the file. note that only one file can be open at a time,
// so you have to close this one before opening another.
File dataFile = SD.open("LOG.csv", FILE_WRITE);

// if the file is available, write to it:
if (dataFile) {
// print to the serial port too: