It's advisable to buy a dress for a wedding at least one month in advance, especially if you need time for alterations or any unexpected issues that may arise. This allows enough time for shopping around and finding the perfect dress without feeling rushed.