Hi, it's a very vague question. What's your current training look like? How old are you? What's your nutrition/sleep like? What is your fitness level? Have you tried to see how many rounds of VPJFT can you do? Have you tested RMFA? If you don't know anything about training get yourself a used copy of Sean Lerwill's Royal Marines Training: Physical Training Manual off eBay.
It depends on where you are starting from. If you don't train much currently it will be much longer but if you do a sport to a pretty high level 8 months may be adequate.
Either way, you want to aim for the maximums rather than the minimums. I have been training properly for about 3 months and I've got to 32 press-ups, 8 pull-ups and 44 sit-ups, and that's already coming from a moderately fit background. It's not all about the tests either, you have got to be able to run pretty far at a good pace as well.