President Trump's attacks on the media are the "best thing" to happen to New York Times subscriptions, the newspaper's editor says.

Times executive editor Dean Baquet was asked by CNN's Brian Stelter on "Reliable Sources" on Sunday about how Trump has affected readership.

"Every time he tweets, it drives subscriptions wildly," Baquet said.

Related: Trump attacks 'fools' at The New York Times

Trump has made the Times a frequent target of his criticisms. On Sunday, Trump tweeted about an advertisement the newspaper will air during the Oscars -- its first television ad in seven years.

"For first time the failing @nytimes will take an ad (a bad one) to help save its failing reputation," Trump tweeted. "Try reporting accurately & fairly!"

For first time the failing @nytimes will take an ad (a bad one) to help save its failing reputation. Try reporting accurately & fairly! — Donald J. Trump (@realDonaldTrump) February 26, 2017

Trump has in the past slammed the Times and said it is losing "thousands of subscribers," a claim the Times has repeatedly said is not true.

Baquet said on Sunday that despite the president's attacks, the newspaper's mission is now "clearer than it's ever been."

"I think what's happened in the last couple months, I have to say, has been tremendous for news organizations," he said. "We're covering a dramatic revolution in government and how the country is governed."