I received a question about the blind seer Tiresias (Tieresias) that asked specifically about references for the seven-year transgendered stint. According to Timothy Gantz’ Early Greek Myths, the first reference that we have to the seven years comes from Ovid’s Metamorphoses, Book III. There Jupiter and his wife Juno make a bet as to which of them gets the most pleasure out of sexual intercourse. Their solution is to find someone who has experienced life as both a man and a woman. There is one person who fills the bill, Tiresias, who was changed to a woman for seven years after striking a pair of coupling snakes with a stick. After seven years, the now-woman seer saw the snakes coupling again. He struck them with his stick and once again, his gender changed, and he became a man, again.
Most of the ancient sources agree that Juno was displeased with Tiresias’ answer and blinded him for it. Phlegon, Hyginus, Lactantius Placidus, and the Second Vatican Mythographer say Jupiter, who was, presumably, as pleased as his wife was upset, extended Tiresias’ life to the span of seven normal lifetimes, which certainly explains why he appears in so many ancient stories.
Ovid. Metamorphoses. Translated by More, Brookes. Boston, Cornhill Publishing Co. 1922.
 While these events according to the laws of destiny occurred, and while the child, the twice-born Bacchus, in his cradle lay, ‘Tis told that Jupiter, a careless hour, indulged too freely in the nectar cup; and having laid aside all weighty cares, jested with Juno as she idled by. Freely the god began; “Who doubts the truth? The female’s pleasure is a great delight, much greater than the pleasure of a male.” Juno denied it; wherefore ’twas agreed to ask Tiresias to declare the truth, than whom none knew both male and female joys: for wandering in a green wood he had seen two serpents coupling; and he took his staff and sharply struck them, till they broke and fled. ‘Tis marvelous, that instant he became a woman from a man, and so remained while seven autumns passed. When eight were told, again he saw them in their former plight, and thus he spoke; “Since such a power was wrought, by one stroke of a staff my sex was changed—again I strike!” And even as he struck the same two snakes, his former sex returned; his manhood was restored.—as both agreed to choose him umpire of the sportive strife, he gave decision in support of Jove; from this the disappointment Juno felt surpassed all reason, and enraged, decreed eternal night should seal Tiresias’ eyes.—immortal Deities may never turn decrees and deeds of other Gods to naught, but Jove, to recompense his loss of sight, endowed him with the gift of prophecy.
Pseudo-Apollodorus Bibliotheca 3. 6. 7 (trans. Frazer) also refers to the transgendering:
 Now there was among the Thebans a soothsayer, Tiresias, son of Everes and a nymph Chariclo, of the family of Udaeus, the Spartan,1 and he had lost the sight of his eyes. Different stories are told about his blindness and his power of soothsaying. For some say that he was blinded by the gods because he revealed their secrets to men. But Pherecydes says that he was blinded by Athena2; for Chariclo was dear to Athena … and Tiresias saw the goddess stark naked, and she covered his eyes with her hands, and so rendered him sightless. And when Chariclo asked her to restore his sight, she could not do so, but by cleansing his ears she caused him to understand every note of birds; and she gave him a staff of cornel-wood,3 wherewith he walked like those who see. But Hesiod says that hebeheld snakes copulating on Cyllene, and that having wounded them he was turned from a man into a woman, but that on observing the same snakes copulating again, he became a man.4 Hence, when Hera and Zeus disputed whether the pleasures of love are felt more by women or by men, they referred to him for a decision. He said that if the pleasures of love be reckoned at ten, men enjoy one and women nine. Wherefore Hera blinded him, but Zeus bestowed on him the art of soothsaying.“ The saying of Tiresias to Zeus and Hera.
Of ten parts a man enjoys one only; But a woman enjoys the full ten parts in her heart.