Remove timezone/timestamp from my data field?

how can i delete the timezone/timestamp from my data field ?
i need it to get only : Disconnection Date Sep 16, 2020
not this !!
Disconnection Date Sep 16, 2020 @ 23:00:00.000
Activation Date Aug 13, 2019 @ 23:00:00.000
help

Where can you this?

i don't get u
sorry
i'm working on logstash / elasticsearch
it genrates the time wich i need to set a condition to remove in the collection phase
cuz it's causing me problems later in kibana (visualize)

I meant:

Where can you see this?

I don't understand. Do you have a practical example?

this code works fine
but i want to know what to add as a condition/filter to not add the time cuz its cuzing me problems

filter{
       csv{
               separator => ","
               columns => ["Subscriber ID ",---,"Activation Date"]
				
		}
		ruby {
                code => "
                        hash = event.to_hash
                        hash.each do |k,v|
                                if v == nil
                                        event.remove(k)
                                end
                        end
                "
        }	
	mutate {
			add_field => {"DATE"=> ["2020-01-03"]}
		}
			
		date {
			match => [ "Service F-- Date", "YYYY-MM-dd" ]
		}
		date {	
			match => [ "Supervision -- Date", "YYYY-MM-dd" ]
			target => "Supervision --  Date"
		}
		
		date {
			match => [ "Account d-- Date", "YYYY-MM-dd" ]
			target => "Account d-- Date"
		}
		
		date {
			match => [ "Activation Date", "YYYY-MM-dd" ]
			target => "Activation Date"
		}
}

just to know , this is ligne of my data :

54,54,0,0,,0,1,2,0,0,0,1,0,0,0,0,0,16,16,,0.02,1,2020-04-08,2020-01-09,,2020-08-06,0,0,2020-04-08,0,0,,0,0,0,0,0,0,0,0,0,0,0,2014-09-06 

all the dates i have dosen't contain any time but elastic or logstash is adding the timezone or timestamp
so how can i set a condition to remove it ??

Just in case you'd prefer speak in french we have a forum #in-your-native-tongue:discussions-en-francais. :wink:

You can use the mutate filter to remove a field.

I believe that the @timestamp field is added by the input plugin you are using.

BTW, I moving your question to #logstash.

haha okay i'll try it (the frensh one ) :wink:

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