Your mileage may vary.
I was involuntarily in a facility after someone reported my attempt several weeks ago. I told the doctor there why I had come to that point. Every day they asked me how depressed I was, and I told them 9/10... Every day they asked if I was going to harm myself, and every day I said not while I was there, but once I got out I was probably going to start looking into a new method since mine had failed.
They kept me for two weeks.
I was discharged, saw a follow-up therapist the next day... during that appointment, they called police to drive me back to the facility, and I was there for another 5 days. Lather, rinse repeat. When I went back, the doctor pretty much said "we already talked so I'm not going to keep you here long."
They had nothing for me on their checklist procedure, so they kicked me loose again.
I was told when I initially went in 5-7 days... but they kept me for 14, and at least one other person while I was there had been kept for 16, so we weren't sure if there was a limit. My second time was just 5 days.
Someone had voluntarily checked themself in while I was there, and they were frustrated at the care (or lack thereof) they received, but they were stuck there for 3 days... but after day 3 they were able to check themself out since they were there voluntarily.