SD Card: dynamic file name

Using the DS3231 library to get/set the time is fine. Just don't use any functions to get information as strings.

Use sprintf() and your own buffer and format specifiers and variables to get the string you want.

int year = 2017; // Get these from the clock
int month = 7;
int day = 3;

char fileName[13];
sprintf(fileName, "%4d%2d%2d.CSV", year, month, day);