Re: Resigning from Starfleet
There doesn't seem to be any compulsory length of stay requirement in Starfleet from what I can tell. If you want to resign, it looks like you easily can, though it might be a few days or weeks before you're able to transfer from a ship to a civilian transport or planet.
Dr. Howard, Dr. Fine, Dr. Howard: For duty and humanity! --Men in Black (1934)