Based on your application you can have a use case where you are accepting the date of birth of a customer and want the Age to be auto-populated. In such a scenario you can use the DATEDIF function which returns the difference in the two dates in terms of days, months, or years.
Where DATE can be a unixtime or Date object selected from a datepicker control. The return type specifies that the value to be provided is in days/months/ years.
So now if you are selecting as follows:
datepicker = Apr-29-2000
It will return output as 20 (which is in years)