Basically, you need a function that returns the same output for a given input (in this case, your input would be the date). In that respect, it's not random at all. There are countless such functions: a simple sub that returns the date in YYYYMMDD format is one. Depending on how your data is indexed, you can probably come up with more useful functions than that.