Star Trek: The Next Generation - Season 7 - Eps 25: All Good Things...
Stardate: 47988.0. Shortly after Picard is diagnosed with a long-term, potentially debilitating brain disorder, he starts experiencing bizarre shifts into three main time periods: 25 years into the future, a few days before the Enterprise-D is sent on its mission to Farpoint station, and the present. Picard realizes that Q is behind these shifts through time. Stardate: 47988.1. After his encounter with Q, Picard assembles the senior staff, and wonders if Q is actually giving him a chance to save humanity by showing him that the spatial anomaly also exists in the past. As they talk, the ship reaches the Neutral Zone, then Picard returns to the future, where Beverly's ship is also on the edge of the Neutral Zone. He convinces a reluctant Worf to accompany the group into Klingon territory, and then travels to the past, where he orders the crew into the Devron system.
About Star Trek: The Next Generation

Title: Star Trek: The Next Generation
First Air Date: 1987-09-28
Last Air Date: 1994-05-23
Status: Ended
Rating: 8.4/10 (from 1547 votes)
Language: EN
Seasons: 8
Total Episodes: 176
Network: Syndication
Genres: Sci-Fi & Fantasy, Action & Adventure, Drama, Mystery
Production Companies: Paramount Television, Norway Corporation
Synopsis
Follow the intergalactic adventures of Capt. Jean-Luc Picard and his loyal crew aboard the all-new USS Enterprise NCC-1701D, as they explore new worlds.
Cast

Patrick Stewart
Jean-Luc Picard

Jonathan Frakes
William T. Riker

Brent Spiner
Data

LeVar Burton
Geordi La Forge

Michael Dorn
Worf

Marina Sirtis
Deanna Troi

Gates McFadden
Beverly Crusher