Legolas's official date of birth is unknown though according to the movie guide he would of been 2931 at the time of the events of the War of the Ring whereas Gandalf would of been 2019. Unlike Legolas the amount of time that Gandalf spent in Middle-earth is actually known. Thanks for asking!