This is 100% based on company's policy. The best and correct person to ask is the HR people of your company.
If they want to count from your date of resignation, nothing you can do.
If they do not allow cashing in of leave, nothing you can do too.
Welcome to the world and wake up.