loading new program doesnt erase the pervious one!

this is a part of my previous code

if(!SD.exists(file_today_name)) { sprintf(file_today_name, "%02d_%02d_%02d.csv", day(), month(), year()-2000); } when I changed it to if(!SD.exists(file_today_name)) { sprintf(file_today_name, "%02d_%02d_%02d.csv", hour(), minute(), second()); } the program created files with names like 08_44_1974.csv, 08_45_1966.csv, 08_45_1990.csv. So the only explanation of this result is instead to write the current second, it writes , second()-2000

Anyone has other explanation, especially if you know that the program keeps behaving strangely

You must have changed something else in your code which is causing the problem. Post all of your code, in code tags (use the </> icon).
BTW. If the code loaded, it has overwritten/erased what was there before. Forget that idea.

Pete

I have about 2000 lines program, I dont think you'll like to read it all, but as I said, this is the only change I made in the program

actually, the program keeps behaving strangely, and SD.exists returns false when I name the file using the following code even if the file exists
</sprintf(file_today_name, “%02d_%02d_%02d.csv”, day(), month(), year()-2000);>

but it works well when I use something like data.csv