Answer by taking a quote from the following article:

Bruce Randall Hornsby (born November 23, 1954) is an American singer and pianist. Hornsby draws frequently from classical, jazz, bluegrass, folk, Motown, gospel, rock, blues, and jam band musical traditions. Hornsby's recordings have been recognized on a number of occasions with industry awards, including the 1987 Grammy Award for Best New Artist with Bruce Hornsby and the Range, the 1990 Grammy Award for Best Bluegrass Album, and the 1994 Grammy Award for Best Pop Instrumental Performance. Hornsby has also achieved recognition for his solo albums and performances, his touring band Bruce Hornsby and the Noisemakers, his bluegrass project with Ricky Skaggs and his appearances as a session and guest musician.

Hornsby played more than 100 shows with the Grateful Dead from 1988 until Jerry Garcia's death in 1995. At some shows in 1988 and 1989, he joined the band as a special guest and played accordion or synthesizer. Starting in the fall of 1990, he played piano (and frequently accordion) at many gigs following the death of longtime Grateful Dead keyboardist Brent Mydland, who died suddenly in July 1990. Mydland's place was filled in September 1990 by Vince Welnick, who became the sole keyboardist by March 1992, although Hornsby still sat in with the band on occasion.  Hornsby's own music evolved significantly during this time period. Critics have suggested that the Dead's vibrant tradition of melding folk music and the blues with psychedelic rock in "loose-knit expressions" and extended jamming "further pushed [Hornsby] outside the confines of mainstream pop." Critics have also commented upon the "close musical connection" formed between Hornsby and Jerry Garcia, suggesting that Hornsby's particular style of jazz-fueled improvisation added to the band's repertoire, and helped to revitalize and refocus Jerry Garcia's guitar solos in the band's sound. Hornsby's friendship with Garcia continued, both inside and outside the band, as the two "challenged" each other to expand their musicianship through several other album and live collaborations. Above all, Hornsby's musical versatility and ability to slip in and out of extended freeform jams won over longtime Grateful Dead fans.  Since his first involvement with the Grateful Dead, Hornsby's live shows have drawn Deadheads and Hornsby has commented: "I've always liked the group of fans that we've drawn from the Grateful Dead time, because those fans are often adventurous music listeners." He has performed a number of their songs at his concerts and as homages on studio and live albums, while Hornsby originals "The Valley Road," and "Stander on the Mountain," appeared several times in the Dead's setlists. Hornsby also co-performed the improvisation "Silver Apples of the Moon" for the Grateful Dead's Infrared Roses.  Hornsby was the presenter when the Grateful Dead were inducted into the Rock and Roll Hall of Fame in 1994 and in 2005 he participated in "Comes a Time", a tribute concert to Jerry Garcia. He continues to work with Dead-related projects, such as Bob Weir's Ratdog, Mickey Hart's solo projects. He performed as part of The Other Ones in 1998 and 2000, and on occasion sat in with The Dead. Hornsby continues to be involved in the Grateful Dead and Furthur community, having opened All Good Music Festival in 2012 featured with Bob Weir on rhythm guitar. In mid-2013, Hornsby performed with Grateful Dead-influenced bluegrass group Railroad Earth. Hornsby reunited with surviving members of the Grateful Dead along with Trey Anastasio from Phish and Jeff Chimenti at Levi's Stadium in Santa Clara, California, and later at Soldier Field in Chicago, Illinois, in July 2015.

How long did he play with them?
until Jerry Garcia's death in 1995.