Quick search by citation:

10 U.S. Code § 2148 - Duration of entitlement

The entitlement of any person to educational assistance under this chapter expires at the end of the ten-year period beginning on the date of the retirement or discharge or other separation from active duty of the person upon whose service such entitlement is based. In the case of a member entitled to educational assistance under this chapter who dies while on active duty and whose entitlement is transferred to a spouse or dependent child, such entitlement expires at the end of the ten-year period beginning on the date of such member’s death.