You can fill it out any time before entry, but they suggest at least seven days.