When did Bill de Blasio and Andrew Cuomo morph into Butch Cassidy and the Sundance Kid?

Really. Go away for a week and Cuomo evolves from George C. Scott toward the end of “Patton” — Tell the mayor I have no desire to drink with him or any other Brooklyn son of a bitch — into Mr. Rogers, though without the sweater.

And de Blasio seemingly acquires a little humility regarding how things work in Albany — where a lawmaker can generally be had for a dime, but where the executive chamber is a formidable institutional presence.

Certainly the mayoral smirk was missing Monday afternoon in the Capitol’s ceremonial Red Room as de Blasio and Cuomo bantered for the press, for all the world like outer-borough buddies from way back.

None of it was convincing, not even close, but it really didn’t have to be, because the point was clear enough.

Both Bill and Andrew — Butch and Sundance — are indeed train robbers. And while there may be some disagreement over which trains to rob, during the 2014 state-city budget cycles a lot of them are going to go down.

Two topics dominated Monday’s press conference — each disguised as first-rank public-policy issues, when in fact they are of urgent concern only to two supremely powerful unions: SEIU 1199 and the United Federation of Teachers, respectively.

Cuomo and de Blasio sang in perfect harmony in opposition to the return to Washington (as current law requires) of $10 billion in federal money now in state Medicaid accounts. Specifically, they demanded that the cash be repurposed to bail out New York City’s fiscally hemorrhaging hospital system — “until a permanent solution to the crisis can be reached.”

Yes, well, there is permanent — and then there is permanent.

New York has had far more acute-care beds than it needs, or can afford, at least since Hugh Carey was governor. Thirty-five years on, the state’s hospitals deliver salaries and benefits to their union-dues-paying employees much more efficiently than they deliver health-care services to the general public.

If this seems sort of upside down, understand that New York governors have long trembled before health-care workers Local 1199 — the union that at one time or another also employed every member of de Blasio’s operational inner circle (including the mayor himself), as well as the new speaker of the New York City Council.

Thus in union-job terms, which is really what the debate is about, a “permanent solution to the crisis” will never be achieved — because to 1199 there is no crisis. The jobs are the whole point.

Butch and the Kid made it quite clear Monday that they have no serious interest in solutions, permanent or otherwise. If they did, there would’ve been specific talk of preparing for the inevitable collapse of white-elephant institutions like Interfaith and Long Island College hospitals in Brooklyn, and their replacement with modern health-care-delivery facilities.

And that’s for a start.

But there wasn’t. So if they get the Medicaid money they seek, expect every dime of it to go to job preservation — with future bailouts to be fashioned as the need arises.

Then there’s the more-manna-for-teachers initiative, a k a universal pre-K — the gussied-up baby-sitting program being touted by both men, albeit in slightly different forms and with modestly different funding mechanisms.

As they, and their aides, explained it Monday, each version would involve hiring thousands of new teachers and aides to provide various unspecified educational services to 4-year-olds at a cost of hundreds of millions of dollars annually — more than a billion in Cuomo’s case.

De Blasio seeks to squeeze millionaires to pay for it. Cuomo appears to have found the necessaries in a spare-change can somewhere, allowing him to avoid talking tax hikes in an election year.

Whether the children will be any better off for all that spending isn’t clear — there’s scant evidence that pre-K confers any lasting benefit, and neither Cuomo nor de Blasio have offered any clinically specific policy objectives. But, as with hospitals, that’s not the point.

Jobs for union-dues-paying teachers and aides are the point — and the pressure to provide them is sufficient to put Butch and The Kid on the same page, at least for a while.

They won’t be there long — think mongoose and cobra — because the institutional and political pressures working against a lasting alliance are too strong.

But compacts of convenience? Certainly. Just like the Hole in the Wall Gang.