That's a fun question.
Let me distinguish between 2 things: the date when some geological material becomes a rock vs the date when a rock becomes "the specific rock it is".
The answer plays into the general classification of rocks classes [sedimentary, igneous & metamorphic].
Sedimentary rocks start from loose sediment, sand, gravel, mud and similar materials. When buried, sediments undergo a process called "diagenesis", where they undergo a series of changes where compaction and the precipitation of minerals (termed "cement") such as carbonates, clays and quartz will bind together these loose particles into a cohesive whole. This is usually a gradual process where you will not be able to easily pinpoint a specific date/year where you may affirm "today, this is now a rock". There are exceptions where the process can be quite rapid, say the formation of beachrock which can happen in decades, but usually you are waiting for a gradual process which operates at the pace of millenia.
Igneous rocks are figuratively simple to understand, as they form from the cooling of molten material [lava or magma]. Smaller bodies cool off quicker and might in some cases be said to have a precise date of formation [for instance, the Vesuvius ash flow of the 24th of August 79 AD], while larger ones may take years or even millenia to cool off and completely solidify. Heat loss is a process controlled by the ratio of surface to volume, so while a magma body of about 1 cubic km might take a few years to cool off, another one of several million cubic kilometers might take a few millenia. The latter might have the opportunity to undergo a process called "fractional crystallisation"), whereby minerals precipitate in a certain order and separate from the remaining melt by gravity, either floating to the top [e.g.: anorthosite] or sinking to the bottom [e.g. olivine cumulates] - the process is not completely unlike a salad dressing unmixing.
But then there are metamorphic rocks. These guys start as rocks, but they usually progressively change their composition and features as they re-equilibrate to match the pressure and temperature stability conditions of their environment, as they are either buried or exhumed. Thus, a rather banal clay stone made up of an assemblage of clay minerals, quartz & feldspar, might as it is progressively buried deeper change it's mineral composition to a muscovite-garnet shist, then a cordierite-garnet shist , then a quartz-K-spar-biotite-sillimanite shist before reaching temperatures where it starts turning to liquid again.
Thus, when studying metamorphic rocks, one is always concerned with 2 "birthdates": the first one being the time when this lump of geological material first became a rock [termed "protolith"], and the time where the rock reached it's current state. Rocks being not unlike books, metamorphic rocks will often preserve quite a bit of the history of the various changes they underwent as they transitionned from their protolith to their final current state [see P-T-t-path], and are great sources of information that way.Source