President Obama will help drum up support for Democrats and hype for Jon Stewart's planned "Rally to Restore Sanity" with an appearance on "The Daily Show" Oct. 27, the White House said.

His visit, just days before mid-term elections on Nov. 2, will be Obama's first appearance on the program since he took office in 2009.

This will be Obama's fifth time on the show. He last appeared just before the presidential elections in 2008 — as a result, the Comedy Central staple scored its highest-ever ratings for a Wednesday night.

Obama has previously expressed support for Stewart's Oct. 30 rally at the National Mall, a joint venture with Stephen Colbert. The rally was created as a response to one held by conservative talk show host Glenn Beck.

