I think SOPC builder has a component like this, but there's not an automatic function. (A problem, of course, is everyone wants something different. Different ways to format, some what rev numbers, build numbers, etc. Plus different issues of storing it in registers, in RAMs, etc.) Anyway, in the following link I have attached a project that does this type of thing. As noted, it's also wrapped in a Virtual JTAG interface, so someone with a JTAG connection(and Quartus) can just open a DOS prompt and ping the device to get this information.
http://www.alteraforum.com/forum/showthread.php?t=1925&highlight=timestamp