I don't recall anyone having to take one in Star Trek, my head canon is they remove it via transporters at night, like a quick swap when aleeping. As someone with intestinal issues that sounds wonderful.
I haven't seen much of the newer series though and I assume they still urinate to lower energy costs. I may have pondered this a bit.
Probably be 32/32 in the near future at the rate they're going.