# Newb needs help with date formatting

**URL:** <https://discuss.elastic.co/t/newb-needs-help-with-date-formatting/92184>\
**Category:** Elasticsearch\
**Created:** [July 7, 2017, 12:36am UTC](https://discuss.elastic.co/t/newb-needs-help-with-date-formatting/92184 "2017-07-07T00:36:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![boysworth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/boysworth/32/19850_2.png) [@boysworth](https://discuss.elastic.co/u/boysworth)\
**Post date:** [July 7, 2017, 12:36am UTC](https://discuss.elastic.co/t/newb-needs-help-with-date-formatting/92184/1 "2017-07-07T00:36:48Z")

</div>

For reasons I cannot understand, I cannot seem to get my date formatting working. Here is the code:  
[EDITED]:

> ```
> PUT /pinggoogle
> {
> "mappings" : {
> "logs" : {
> "properties" : {
> "pingdate": {
> "type":"date",
> "format":"yyyy/MM/dd HH:mm:ss"
> }
> }
> }
> }
> }
> put pinggoogle/logs/1
> {
> "pingdate": "2017/07/07 09:05:42"
> }
> 
> ```

My last command reads the document I am trying to ingest and seems to parse it correctly, but when I look at the index in Kibana, it looks like it brings it in as an unknown type.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 7, 2017, 12:39am UTC](https://discuss.elastic.co/t/newb-needs-help-with-date-formatting/92184/2 "2017-07-07T00:39:41Z")

</div>

> [@boysworth](#):
>
> kk:mm:ss

What is `kk`? It's not a format we support according to [format | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-date-format.html)

---

<div class="post-metadata">

**Author:** ![boysworth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/boysworth/32/19850_2.png) [@boysworth](https://discuss.elastic.co/u/boysworth)\
**Post date:** [July 7, 2017, 12:43am UTC](https://discuss.elastic.co/t/newb-needs-help-with-date-formatting/92184/3 "2017-07-07T00:43:19Z")

</div>

if I read the documentation correctly it is the hour in 24 hour time. [http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html](http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html)

---

<div class="post-metadata">

**Author:** ![boysworth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/boysworth/32/19850_2.png) [@boysworth](https://discuss.elastic.co/u/boysworth)\
**Post date:** [July 7, 2017, 1:26am UTC](https://discuss.elastic.co/t/newb-needs-help-with-date-formatting/92184/4 "2017-07-07T01:26:01Z")

</div>

... but I get the same error if I change the kk to hh...

---

<div class="post-metadata">

**Author:** ![boysworth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/boysworth/32/19850_2.png) [@boysworth](https://discuss.elastic.co/u/boysworth)\
**Post date:** [July 7, 2017, 4:01pm UTC](https://discuss.elastic.co/t/newb-needs-help-with-date-formatting/92184/5 "2017-07-07T16:01:19Z")

</div>

OK, I edited my code to isolate the problem and changed the kk to hh. My date is still showing up as an unknown type...

---

<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:** [August 4, 2017, 4:06pm UTC](https://discuss.elastic.co/t/newb-needs-help-with-date-formatting/92184/6 "2017-08-04T16:06:01Z")

</div>

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