Your End Date. The most crucial detail in a resignation letter is your end date. Legally and according to your company's policy, you might be required to give a minimum amount of notice (two weeks, or possibly more, depending on the company and the role). If that's the case, you don't want there to be any confusion about how much notice you give. If it's right there in writing in a letter dated two weeks before your last day, you're saving yourself the hassle.
Prepare for It. In this case, all you can do is politely deliver your resignation, then strive to make the transition as easy as possible for your team. Your manager may not have the ideal reaction to your news__and your workplace may not be the most pleasant environment for the next two weeks__but to avoid burning bridges, it's best to work through it with a positive attitude.