# Assigning \_timestamp to a property

**URL:** https://discuss.elastic.co/t/assigning--timestamp-to-a-property/2058
**Category:** Elasticsearch
**Created:** [June 6, 2015, 7:33am UTC](https://discuss.elastic.co/t/assigning--timestamp-to-a-property/2058 "2015-06-06T07:33:27Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![bjoernsteffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bjoernsteffens/32/545_2.png) [@bjoernsteffens](https://discuss.elastic.co/u/bjoernsteffens)
#### Post date: [June 6, 2015, 7:33am UTC](https://discuss.elastic.co/t/assigning--timestamp-to-a-property/2058/1 "2015-06-06T07:33:27Z")

</div>

Hi,

I am trying to assign \_timestamp to a property when I post to ElasticSearch. Something is wrong and I have been staring at this for a while now. ThnX in advance for any pointers.

GET /persons/\_mapping/family

"family": {  
"\_timestamp": {  
"enabled": true,  
"store": true,  
"path": "family.create\_date",  
"format": "yyyy-MM-dd HH:mm:ss",  
"ignore\_missing": true  
},  
"properties": {  
"about": {  
"type": "string"  
},  
"age": {  
"type": "integer"  
},  
"create\_date": {  
"type": "date",  
"format": "dateOptionalTime"  
},  
"first\_name": {  
"type": "string"  
},  
"interests": {  
"type": "string"  
},  
"last\_name": {  
"type": "string"  
}  
}  
}

POST /persons/family  
{  
"first\_name" : "me\_myself",  
"last\_name" : "\_and\_I",  
"age": "00",  
"about" : "I love to figure things out",  
"interests": ["photography", "running", "chocolate", "music"]  
}

GET /persons/family/\_search

```
  "hits": [
     {
        "_index": "persons",
        "_type": "family",
        "_id": "AU3HyMph3okB74YfFVvn",
        "_score": 1,
        "_source": {
           "first_name": "me_myself",
           "last_name": "_and_I",
           "age": "00",
           "about": "I love to figure things out",
           "interests": [
              "photography",
              "running",
              "chocolate",
              "music"
           ]
        }
     },
```

---

<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, 12:09am UTC](https://discuss.elastic.co/t/assigning--timestamp-to-a-property/2058/2 "2017-07-06T00:09:15Z")

</div>


