FCL.025 (c)
Validity Period
(1) The successful completion of the theoretical knowledge examinations will be valid:
(i) for the issue of a light aircraft pilot licence or a private pilot licence, for a period of 24 months;
(ii) for the issue of a commercial pilot licence, instrument rating (IR) or en route instrument rating (EIR), for a period of 36 months
(iii) the periods in (i) and (ii) shall be counted from the day when the pilot successfully completes the theoretical knowledge examination, in accordance with (b)(2).
Everything you need to know is contained in Part FCL.