I decided to learn programming at 38, started at 39, and now at 41 I am in the process of releasing a commercial version of software I created. I moved into this field from medicine, to have greater control over my life, scratch my entrepreneurial itch and broaden my horizons. I have no regrets.
You can do it if you really want to, and at any age.