You can terminate the rent by means of a registered letter to the landlord, stating:
The minimum notice period is one month. The termination is always valid from the last day of the next month and you pay rent until the last day of the rental period. For example, if you give notice on April 20, you will pay rent until May 31. The date when the letter is received by the landlord is the date he is allowed to take the notice from so please consider this when sending by post and always keep your proof of posting.
Also see: check-in / check-out guidelines.