# DOB by Age field

**URL:** <https://community.open-emr.org/t/dob-by-age-field/22118>\
**Category:** OpenEMR Development\
**Created:** [February 24, 2024, 11:17pm UTC](https://community.open-emr.org/t/dob-by-age-field/22118 "2024-02-24T23:17:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![callsheeraz](https://community.open-emr.org/letter_avatar_proxy/v4/letter/c/41988e/32.png) [@callsheeraz](https://community.open-emr.org/u/callsheeraz)\
**Post date:** [February 24, 2024, 11:17pm UTC](https://community.open-emr.org/t/dob-by-age-field/22118/1 "2024-02-24T23:17:30Z")

</div>

Hi Everyone,  
As you check the below screen I have created a new filed “Age” in Add patient form by form layout. I want to fill DOB field automatically when I put age number in “Age” field. Month and Day should be current in DOB field but Year should be according to “Age” field. Anyone please suggest the code. I would be really thankful to you.

 ![image](https://discourse-uploads-openemr.s3.dualstack.us-east-1.amazonaws.com/original/3X/3/8/385728baebcfab45d58a1f24d3097c5f68f15563.png)

Regards,  
M Sheeraz Shaikh.
