A few days.
If the spleen is only minorly injured and there is only minimal or no bleeding a couple of days is usually enough, as long as it is the only injury.
If it is a more major rupture
and there has been some bleeding it may be several days. If it has to be removed it will depend on how you do postoperatively but will likely require at least 2 days after surgery and likely more than 2.