The last act of the Watergate scandal was set yesterday with a tart courtroom denunciation of former President Nixon and a promise of prison in 20 days for his once closest advisers H.R. (Bob) Haldeman and John N. Mitchell.

U.S. District Court Judge John J. Sirica said he would give the two men until June 22 to surrender to federal authorities and start serving their 2 1/2-to-8-year sentences for conspiracy to obstruct justice and related crimes in the cover-up of the 1972 burglary of Democratic National headquarters at the Watergate office building here.

Lawyers for Haldeman, former White House chief of staff, and for Mitchell, who served as Attorney General of the United States, said their clients would undoubtedly prefer to report directly to the institutions to be assigned to them by federal prison officials rather than to surrender to U.S. marshals here.

Sirica said he would still expect them in his courtroom for a formal hearing before June 22 at which time he can take official action.

Yesterday's session was a semi-formal conference that Haldeman's and Mitchell's lawyers had requested - without their clients being present - in light of the Supreme Court's refusal May 23 to review their convictions. The high court also upheld the conviction of former top White House aide John D. Ehrlichman, who has already started serving his sentence, but Sirica has yet to receive the official papers or "mandate" of the court.

"I really don't have any jurisdiction at this point," he reminded the defense attorneys at yesterday's brief meeting.

Haleman's lawyer, John J. Wilson, said he wanted the conference anyway to plead for as much time as he could get for Haldeman to put his affairs in order.

"I know there will be critics who'll say he's had two years to do that," Wilson observed, "but a man always puts these things off in the hope that they won't occur."

In typically combative fashion, Wilson began with caustic allusions to the leak of the Supreme Court's action four weeks before it was announced and to the televised interviews Nixon recently granted to commentator David Frost for a fee of $600,000 plus a percentage of the profits.

"The [former] President of the United States, for 600,000 pieces of silver, accused our client on television of having committed crimes," Wilson protested. He said the Nixon-Frost interviews were seen by millions of people, perhaps even the Supreme Court justices, while the case was ostensibly "sub judice," awaiting their decision.

In the first of his televised interviews with Frost, which was aired on May 7, Nixon sought to justify his taped advice to Haldeman and Ehrlichman to tell investigators "I don't remember - I can't recall," by saying he was simply acting as a defense attorney.

"Maybe I defended them too long," the pardoned ex-President said at another point. "But I was concerned about them . . . I felt that they, in their hearts, felt they were not guilty."

Last week, after the final interview was televised, Haldeman openly challenged Nixon's "explanation of the cover-up" and vowed "to deal with many things that have been left unsaid" in a forthcoming book.

I'll cover everything on the subject with the gloves off and no holds barred," Haldeman said.

Stricken with phlebitis and attendant complications, Nixon never testified during the lengthy cover up trial that ended on Jan. 1, 1975, with the convictions of Haldeman, Ehrlichman, Mitchell and a fourth defendant, former Assistant Attorney General Robert Mardian who pressed a successful appeal.

In pleading for a few more weeks of freedom, Wilson said yesterday that Haldeman has been hoping to attend the June 19 graduation of his daughter, Susan, from law school in Los Angeles "without being, I hate to say the words, in custody."

Mitchell's attorney, Plato Cacheris, added that the former Attorney General is "quite upset about the premature disclosure of the vote in the Supreme Court" and would like to be free to work with his lawyers on a petition for reconsideration. The deadline for that is June 17, the fifth anniversary of the Watergare break-in.

The disclosure that Cacheris referred to was a report by National Public Radio on April 21 - a month before the court disclosed its ruling - that the appeals had been turned down.

Emphasizing that he was using the words advisedly, Wilson said haldeman would "like to be" sent to the federal detention center at Lompoc, Calif. Cachers told reporters that Mitchell has yet to express a preference, but would no doubt want to be assigned to same institution in the East, as close as possible to his teenage daughter, Marty.

With a smile, Judge Sirica concluded the hearing with a parting jab at Wilson for Wilson's repeated protests during the cover-up trial that Sirica's rulings on various points of law were simply filling up a huge "error bag"

Alluding to his advance announcements at yesterday's semi-formal session, Sirica told the defense lawyer that "you can put that in your error bag."

Wilson responded with a laugh. "May I say abjectly, or apologetically," he told the judge, "that I've thrown the darn thing away."