Add field date problem

i used this code to add a new column with a specific date
mutate {
add_field => {"D"=> ["2020-01-01"]}
}
it gives me the date but its adding minutes and hours
Jan 1, 2020 @ 01:00:00.000 so is it normal ??
but i wanted to declare it as a date
i added this
mutate {
add_field => {"D"=> ["2020-01-01"]}
}
date {
match => [ "D", "YYYY-MM-dd" ]
target => "D"
}
it shows another wrong time
so can u help i just need to add a column with the date 2020-01-01

What timezone are you in?

in fact i don't need the time to be shown
i just need the date with no extention

elasticsearch does not have a date type separate from the time. Date/time fields are stored as the number of milliseconds since the epoch.

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