# Date with long value not working

**URL:** <https://discuss.elastic.co/t/date-with-long-value-not-working/185368>\
**Category:** Elasticsearch\
**Tags:** ecs-elastic-common-schema\
**Created:** [June 12, 2019, 9:22am UTC](https://discuss.elastic.co/t/date-with-long-value-not-working/185368 "2019-06-12T09:22:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![umeshmishra099](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/umeshmishra099/32/47939_2.png) [@umeshmishra099](https://discuss.elastic.co/u/umeshmishra099)\
**Post date:** [June 12, 2019, 9:22am UTC](https://discuss.elastic.co/t/date-with-long-value-not-working/185368/1 "2019-06-12T09:22:36Z")

</div>

I have below mapping  
{  
"indexTest": {  
"mappings": {  
"indexTest\_type": {  
"properties": {  
"date22": {  
"type": "dateColumn",  
"format": "yyyy-MM-dd||yyyy-MM-dd'T'HH:mm:ss||yyyy-MM-dd HH:mm:ss||yyyy-MM-dd'T'HH:mm:ss.SSS'Z'||HH:mm:ss||HH:mm:ss.SSS||epoch\_millis"  
}  
}  
}  
}  
}  
}

indexed value

"\_source": {  
"dateColumn": "2017-09-01"  
}

I am trying to search based on long value of date i am not getting the response . Please find search query below

GET indexTest/\_search  
{  
"query": {  
"match": {  
"dateColumn": {  
"query": "1504204200000"  
}  
}  
}  
}

same is working for dateTime value

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [June 12, 2019, 12:45pm UTC](https://discuss.elastic.co/t/date-with-long-value-not-working/185368/2 "2019-06-12T12:45:43Z")

</div>

can you please provide a fully fledged example for reproduction, which includes index creation, mapping creation, document indexing? You mentioned a `dateTime` value, but your `_source` does not include it.

Please take some time to come up with something that is reproducible for others, otherwise it is super hard to help.

Also, as this forum supports markdown, please use it to properly format code snippets - this makes it infinitely more readable, which increases your chances of someone looking at your problem.

Thanks a lot!

---

<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 10, 2019, 12:45pm UTC](https://discuss.elastic.co/t/date-with-long-value-not-working/185368/3 "2019-07-10T12:45:44Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
