**bmanfield**Hi,

I am developing a form that calculates a person's age on new years eve of the current year. The EOY date field is only used for calculation and therefore will be hidden. Is there any way to dynamically set the year field for the date to the current year so that the form doesn't have to be updated each year whilst maintaining static values for day and month? (31 December)

Thanks

Ben

- JotForm Support
**Mike_G**I'm not sure exactly how you would like your form be used. But you can use the Date field and set the Default Date to the Current Date. By doing that the Date field changes every day. The Default date is equivalent to the date on your device or your computer, where the form is opened.

Eventually, the date field will be 12/31/CurrentYearHere

You'll just have to subtract the Person's Birthday from the Current Date. (use another Date field to get the Person's Birthday) Divide the difference by 365.25 days to get Age. Also, get the Floor value of the Age so that its value will be rounded to the nearest integer. Use this guide: Form-Calculation-Math-Function-Reference

Here's the form I have used for my example: http://form.jotformpro.com/form/51921351271953

Please feel free to clone it for your reference.

I hope this helps. Let us know if you need further assistance. Thank you.

- JotForm Support
**Mike_G**I would like to apologize. I have mistakenly used the Math Function Floor(). You can remove that and instead use this workaround to remove the decimal places on the Person's Age Value.

Thank you.

**bmanfield**I'm looking to have a static defined date that is 31 December YYYY where YYYY is dynamically populated. Otherwise I have to update the form annually to match the current year. I'm not sure if you can define it using something like 31/12/{dateField:year} or using

*#year_1*?Its not that huge if I have to manually update it but it makes the form robust.

- JotForm Support
**Mike_G**Unfortunately, this: {dateField:year} is not working with conditions. But I was able to think of a way to get the current year only and place it on a field. However, this, of course, still involves a Date field with Default Date set to Current Date.

Since, I think, you only need to get the current year and the year of the Person's birthday to get the age. I have extracted both years from their corresponding Date field and get the difference.

Try playing with this form by cloning it.

http://form.jotformpro.com/form/51918717550965

If you change the Current Date Field's Year, the year on the New Year's Eve field will also change.

Meaning, every year the Date on the New Year's Eve field will change automatically.

Let us know if this works for you. Thank you.

**bmanfield***Since, I think, you only need to get the current year and the year of the Person's birthday to get the age. I have extracted both years from their corresponding Date field and get the difference.*I'll have a look and see if it meets my needs. I'm not sure it will as I need to calculate their age on New Years eve based upon their DOB.

eg: Players registering for 15 years and under can be > 15yo but not 16 as of the end of the current year. (31 December)

Thanks.