“I had . . . no idea. . . . He was . . . flattering. He seemed to . . . to understand . . . to sympathize . . . ”
-- The Grey Lady (DH31)
c. 1944 – Tom Riddle, using his considerable charisma and charm, convinces the ghost of Ravenclaw House, Helena Ravenclaw, to reveal the secret hiding place of her mother’s long-lost diadem. Years later, she would confess to Harry that he seemed to understand her anguish and remorse (DH31).
The timeline of Tom Riddle's finding the diadem is impossible to decipher with certainty. Harry reasons that Riddle
"had traveled to that far-flung forest and retrieved the diadem from its hiding place, perhaps as soon as he left Hogwarts, before he even started work at Borgin and Burkes ... But the diadem, once it became his precious Horcrux, had not been left in that lowly tree ... No, the diadem had been returned secretly to its true home, and Voldemort must have put it there the night he asked for a job! He hid the diadem in the castle, the night he asked Dumbledore to let him teach! He must’ve hidden the diadem on his way up to, or down from, Dumbledore’s office!" (DH31)
If this is true, then Riddle charmed the Grey Lady at some point during his time at Hogwarts but after he learned about Horcruxes, therefore between the summer of 1942 and the summer of 1945. He likely didn't turn the diadem into a Horcrux until decades later, shortly before visiting Hogwarts on the pretense of asking for a teaching position and hiding it in the Room of Requirement. This didn't happen until the late 1960s.
The Room of Requirement is located on the seventh floor of Hogwarts castle. However, according to book four, the entrance to Dumbledore's office is very likely on the second floor (GF28). This is one of the few instances where Rowling's mental map of the castle failed her. There is no logical way that Riddle would have had to travel to the seventh floor to get to Dumbledore's office to ask for the job. So in book six, Rowling moved Dumbledore's office to the seventh floor. If asked, I'm sure she would just say that the castle is magical and things move around. Here's how Rowling responded when a fan asked if she had a blueprint or map of the school:
No, because all those staircases keep shifting around and rooms pop out of nowhere, and stuff just moves too much. But I have got a notebook that reminds me what floor everything is on, just to keep track. Of course, if anything moves, I can blame it on magic, not my mistakes (Sch1).