I need some coding help, and would appreciate any suggestions as to the feasibility of this idea and how to accomplish it.

I'm looking to incorporate a SD card to log disolved oxygen readings from an atlas scientific probe and breakout board. I would like to set up the arduino to write to a new file for each reading. I'm looking for a way in which I can have the file be named based on the date/time as well as a user defined 5 digit number. i.e. 2012.10.10.09.30.xxxxx.csv.

I would like the date and time section of the file name to be set automatically, and use a rotary encoder to scroll through 0-9 and use the momentary switch to move to the next number in the user defined section. Once the last number is selected, pressing the momentary switch would begin logging.

As far as the SD card, I was looking at using the Parallex SD card adapter sold by Jameco (2082935), but am open to other options. Any guidance would be greatly appreciated.

I would like one file, one reading and the date and time stamp to correlate DO to brix in a fermenting barrel of wine. The user defined number will be the 5 digit barrel number. We're looking to see with a few hits of oxygen from a stone at different intervals affects the rate of fermentation and temperature. I'm looking for an easy way to differentiate the different times we hit each barrel with O2. Since I can't use more than 8 characters for the file name, I'm thinking of adding a letter to the end of the number sequence to denote the time sequence. This however, runs into the problem that I would need to write out the letter to keep track of which is next in the sequence. If I'm doing that, I might as well write down the time and date as well on a paper list & rename the files to the format I originally suggested once on the computer. That is just more work, and I think there could be a more elegant solution that isn't causing me to spend a bunch of time cross referencing that paper list.

If you are using sdfatlib, rather than the cut down version (SD.h) supplied with the IDE, you can update the timestamp on files, but you will need to maintain the time within your sketch, either with an RTC, or using the software-only Time library functions.