How to link bank account to demat account

How long does it take to link a bank account to a demat account?,