As parabellum says, as long as you are a member at the time you fly it is irrelevant when you became a member. You simply show your membership card at check-in and the miles will be credited to your account. With some airlines you can associate an existing booking with a new membership online.