# Change data field to date type

**URL:** <https://discuss.elastic.co/t/change-data-field-to-date-type/184185>\
**Category:** Logstash\
**Created:** [June 4, 2019, 1:03pm UTC](https://discuss.elastic.co/t/change-data-field-to-date-type/184185 "2019-06-04T13:03:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![soufiane1](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@soufiane1](https://discuss.elastic.co/u/soufiane1)\
**Post date:** [June 4, 2019, 1:03pm UTC](https://discuss.elastic.co/t/change-data-field-to-date-type/184185/1 "2019-06-04T13:03:30Z")

</div>

Hello everyone,

I am trying to load a data into kibana with logstash but still receiving the following error :

 ![errordate](https://us1.discourse-cdn.com/elastic/original/3X/b/8/b84abe0d2abe84575c00087d8d8265ed27acbd2f.jpeg)

Here is my config : ( "Date et heure" in my csv is like "24/06/2019 21:56")

##############  
mutate{

```
	convert => { 
		
		"Date et heure" => "string"
		"Utilisateur" => "string" 
		"Code" => "integer" 
		"Libellé évènement" => "string" 
		"Code retour" => "integer" 
		"Application" => "string" 
		"Code site" => "integer" 
		"Objet Start" => "string" 
		"Usage cache" => "string" 						
		"Valeur avant modif" => "string" 
		"Valeur après modif" => "string"	
	
	}
	
	date {	
	
		match => ["Date et heure", "dd/MM/YY HH:mm"] 
	
	}

```

#################

Can anyone help ?

---

<div class="post-metadata">

**Author:** ![pastechecker](https://avatars.discourse-cdn.com/v4/letter/p/0ea827/32.png) [@pastechecker](https://discuss.elastic.co/u/pastechecker)\
**Post date:** [June 4, 2019, 1:46pm UTC](https://discuss.elastic.co/t/change-data-field-to-date-type/184185/2 "2019-06-04T13:46:18Z")

</div>

You cannot load data to Kibana.  
Kibana is the frontend software that reads data from ElasticSearch and puts a graphic on top of you data.

You have a typo in your config in the line 42. Did you close the mutate filter? Because I see that you go directly to date and hence the error.

Try:  
mutate{

```
	convert => { 
		
		"Date et heure" => "string"
		"Utilisateur" => "string" 
		"Code" => "integer" 
		"Libellé évènement" => "string" 
		"Code retour" => "integer" 
		"Application" => "string" 
		"Code site" => "integer" 
		"Objet Start" => "string" 
		"Usage cache" => "string" 						
		"Valeur avant modif" => "string" 
		"Valeur après modif" => "string"	

	}
	}
	date {	
	
		match => ["Date et heure", "dd/MM/YY HH:mm"] 
	
	}
```

---

<div class="post-metadata">

**Author:** ![soufiane1](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@soufiane1](https://discuss.elastic.co/u/soufiane1)\
**Post date:** [June 4, 2019, 3:02pm UTC](https://discuss.elastic.co/t/change-data-field-to-date-type/184185/3 "2019-06-04T15:02:17Z")

</div>

thank you for your response,

the error was because I didn't closed the mutate, but it looks like the date{} don't work, I don't see any change,  
For example if a date is "04/06/2019 03:40", it loads only"4"

---

<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 2, 2019, 3:02pm UTC](https://discuss.elastic.co/t/change-data-field-to-date-type/184185/4 "2019-07-02T15:02:17Z")

</div>

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