Tom Riddle had wheedled the location of the Horcrux from the Grey Lady while a student at Hogwarts. At some point after leaving school, he traveled to Albania, retrieved the diadem, and used the murder of an Albanian peasant to turn the diadem into a Horcrux (DH31).
Harry reasons that Tom Riddle traveled to Albania to retrieve the diadem, turned it into a Horcrux, then returned to Hogwarts to hide it in the Room of Requirement. However, Riddle's return to Hogwarts doesn't occur until the late 1960s, shortly after Dumbledore becomes Headmaster. Assuming that Riddle would not have left one of his Horcruxes in a random hollow tree for decades, it would seem that his visit to Albania and the creation of the Horcrux happened about twenty years after he wheedled the location out of Helena Ravenclaw's ghost.