When storing data on your sd card, don't use a human readable time (year, month, day, etc.). ZThat's very hard for a computer to work with - better use the unix timestamp, normally you can get that through Time.now(). That's an unsigned long, seconds since epoch. Now a 24-hour period is simply a difference of 246060 = 86400 seconds. Later when you import that file in a spreadsheet application it's trivial to have those dates converted into something human readable again for you, while the seconds representation makes processing/graphing easier.
Now as you log every 10 seconds, that's 8,640 lines per day. So the record of 24 hours ago should be 8,640 lines before the current line in the file.
But now, how to get to a certain line? There's no line search function, just a position function. So you have to make sure every line is of identical length, so you can simply calculate where you have to go. Here the sprintf() function comes in play. This can guarantee you to write a single line of exactly the same length every time, making searching for an entry in the file easy.
Your file writing section becomes something like this:
// This section is for storing values to SD card
myFile = SD.open("Nautilus.txt", FILE_WRITE);
if (myFile) {
char line[26]; // 25 characters plus null terminator
char temp[7];
dtostrf(T1, 6, 2, temp); // Convert float to string.
char press[8];
dtostrf(L1, 7, 2, press);
sprintf(line, "%10d %6s %7s", now.unixtime(), temp, press);
myFile.println(line); // writes a 25-character string plus a \n so 26 characters to the file - that's one line.
}
This way every line will be 26 characters long, and it becomes easy to read back the parts with temperature and pressure (use strncpy(dest, src + beginIndex, endIndex - beginIndex);)
, and convert it back into float using atof(). The line of 24 hours ago starts 8640 * 26 = 224,640 characters ago.
For comparison: floats are never exactly the same, use an interval. So:
if (abs(yesterdayTemp - todayTemp) < 0.5) {
// Less than 0.5° difference = equal.
}