# Converting date into date format in logstash

**URL:** <https://discuss.elastic.co/t/converting-date-into-date-format-in-logstash/374111>\
**Category:** Logstash\
**Created:** [February 5, 2025, 9:09am UTC](https://discuss.elastic.co/t/converting-date-into-date-format-in-logstash/374111 "2025-02-05T09:09:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![roopeshetty](https://avatars.discourse-cdn.com/v4/letter/r/b9bd4f/32.png) [@roopeshetty](https://discuss.elastic.co/u/roopeshetty)\
**Post date:** [February 5, 2025, 9:09am UTC](https://discuss.elastic.co/t/converting-date-into-date-format-in-logstash/374111/1 "2025-02-05T09:09:50Z")

</div>

Hi

We are trying to ship a csv file from Filebeat \> Logstash \> Elasticsearch. This csv files has column by name “CreateOn” which will have the dates as below;

Thursday, March 10, 2016 3:00:23 PM UTC  
Thursday, May 4, 2017 11:29:02 AM UTC  
Sunday, March 9, 2014 2:43:16 PM UTC  
Tuesday, August 26, 2014 11:42:33 AM UTC  
Wednesday, January 24, 2024 4:32:20 PM UTC  
Friday, May 17, 2024 11:08:29 AM UTC  
Wednesday, May 10, 2017 12:45:02 PM UTC  
Thursday, May 9, 2024 9:04:25 AM UTC

We are getting this fields with CSV filter on logstash but the values are coming in type text but we wanted it as date format.

We tried below date filter on logstash conf file to convert it, but its not pushing anything after modify it .

date {  
match =\> ["CreateOn", "EEE, MMMM d, yyyy h:mm:ss a z"]  
target =\> "CreateOn"  
}

We know its something related to the time format input , can someone help us to fix this.

Our logstash conf looks like below;

csv {  
skip\_header =\> "true"  
separator =\> ","  
columns =\> ["Display Label", "CreateOn", "CommonName", "IsSelfSigned", "Organization", "OrganizationUnit", "Issuer", "IssuerName", "SerialNumber", "ValidTo", "Version", "SignatureAlgorithm", "Subject", "Subject Alternative Names"]  
}

date {  
match =\> ["CreateOn", "EEE, MMMM d, yyyy h:mm:ss a z"]  
target =\> "CreateOn"  
}
