If you are applying for study permit is going to be for the same duration as your study permit. If the passport expires before the study permit, the visa will be valid till the expiration of the passport. However if is for TRV (visitor) it is valid for 10 years or 1 month before your passport...