That depends on a lot of factors. Your age, gender, body mass index, state of mind, you tolerance to alcohol, type and quantity of food consumed and during or before alcohol consumption etc. I am a casual drinker but i do get carried away with the boys sometimes but i would not touch alcohol for at least 24 hours before signing on.
If you get invited to a bucks night where there is a good chance that you get totally ****faced make sure you do it three days before you get in the cockpit and drink lots of water to help your body recover.
Safe flying