# Calculate age form Birthday (type:date)

**URL:** https://discuss.elastic.co/t/calculate-age-form-birthday-type-date/6632
**Category:** Elasticsearch
**Created:** [February 8, 2012, 8:39am UTC](https://discuss.elastic.co/t/calculate-age-form-birthday-type-date/6632 "2012-02-08T08:39:32Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![CBR](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@CBR](https://discuss.elastic.co/u/CBR)
#### Post date: [February 8, 2012, 8:39am UTC](https://discuss.elastic.co/t/calculate-age-form-birthday-type-date/6632/1 "2012-02-08T08:39:32Z")

</div>

Hello!  
As I think it's stupid to store the age itself, I need to know if and  
how it's possible to calculate the age from the stored birthday, to  
filter searchresults by the calculated age.  
[…]  
"dob":{  
"include\_in\_all":false,  
"format":"dateOptionalTime",  
"type":"date"  
},  
[…]

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 6, 2017, 3:40am UTC](https://discuss.elastic.co/t/calculate-age-form-birthday-type-date/6632/2 "2017-07-06T03:40:09Z")

</div>


