It took the Senate 21 minutes yesterday to enact the District of Columbia budget for the 1978 fiscal year, eight months and 23 days after the fiscal year began last Oct. 1.

After a placid discussion, the Senate agreed to the compromise version of the budget that was recommended May 11 by a Senate-House conference committee. The House agreed to the compromise last week. Yesterday's action sends the budget to President Carter for his signature.

Since Oct. 1, the city has been operating under a stopgap appropriations resolution because of a dispute over the proposed convention center near Mount Vernon Square.

Among items in the final budget was $27 million to buy land for the proposed center at Mount Vernon Square. That money cannot be spent until Congress is assured that private investors will build millions of dollars of tax-generating hotels, restaurants and stores to serve convention visitors.

As enacted, the budget provides for operating funds totaling $1,239,449,800, plus a capital outlay (mainly construction) program of $129,173,400 - making a total budget of $1,368,623,200. As its share of the operating budget, Congress approved a U.S. payment to the city of $276 million.