How to access a specific entry on a csv file based on todays date

Presuming you really need the date in every line. I hate storing information that the code can regenerate. Storing the date sequence is equivalent to creating a 2D array just so you can store the row index in the first element of each row. The only reason to store the dates would be if you had a discontinuity in the array, where you skipped days for some reason.
I'd organize it as "starting date" as a separate element, then just the numeric password codes for each date. Any subsequent date is calculable as an index. That reduces the storage to 12 bytes for the date (which could actually be a long unsigned int), and an array of 2*N bytes, where N is the number of days you want to store.
C